Skip to content

D #4

@pipecarreracriollo-ux

Description

@pipecarreracriollo-ux

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local savedPos = nil
local flying = false
local noclip = false
local speed = 50
local bodyGyro, bodyVel

-- Referencia a la GUI
local screenGui = script.Parent

-- Crear marco (Frame)
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0, 200, 0, 250)
frame.Position = UDim2.new(0, 20, 0, 100)
frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
frame.Active = true
frame.Draggable = true
frame.Parent = screenGui

-- Función para crear botones
local function createButton(name, posY)
local btn = Instance.new("TextButton")
btn.Size = UDim2.new(1, -10, 0, 40)
btn.Position = UDim2.new(0, 5, 0, posY)
btn.Text = name
btn.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
btn.TextColor3 = Color3.fromRGB(255, 255, 255)
btn.Font = Enum.Font.SourceSansBold
btn.TextSize = 20
btn.Parent = frame
return btn
end

-- Crear botones
local tp1Btn = createButton("TP1 (Guardar)", 10)
local tp2Btn = createButton("TP2 (Ir)", 60)
local trasBtn = createButton("Tras (NoClip)", 110)
local volBtn = createButton("Vol (Volar)", 160)

-- TP1: Guardar ubicación
tp1Btn.MouseButton1Click:Connect(function()
if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
savedPos = player.Character.HumanoidRootPart.CFrame
print("✅ Ubicación guardada!")
end
end)

-- TP2: Teletransportar
tp2Btn.MouseButton1Click:Connect(function()
if savedPos and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
player.Character.HumanoidRootPart.CFrame = savedPos
print("✅ Teletransportado a ubicación guardada.")
else
print("⚠️ No hay ubicación guardada.")
end
end)

-- Tras: Activar/Desactivar NoClip
trasBtn.MouseButton1Click:Connect(function()
noclip = not noclip
if noclip then
print("✅ NoClip ACTIVADO")
game:GetService("RunService").Stepped:Connect(function()
if noclip and player.Character then
for _, part in pairs(player.Character:GetDescendants()) do
if part:IsA("BasePart") and part.CanCollide == true then
part.CanCollide = false
end
end
end
end)
else
print("❌ NoClip DESACTIVADO")
if player.Character then
for _, part in pairs(player.Character:GetDescendants()) do
if part:IsA("BasePart") then
part.CanCollide = true
end
end
end
end
end)

-- Vol: Activar vuelo
volBtn.MouseButton1Click:Connect(function()
flying = not flying
local hrp = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
if flying and hrp then
print("✅ Vuelo ACTIVADO")
bodyGyro = Instance.new("BodyGyro", hrp)
bodyGyro.P = 9e4
bodyGyro.MaxTorque = Vector3.new(9e9, 9e9, 9e9)

    bodyVel = Instance.new("BodyVelocity", hrp)
    bodyVel.MaxForce = Vector3.new(9e9, 9e9, 9e9)
    
    -- Controles de vuelo
    mouse.KeyDown:Connect(function(key)
        if flying then
            if key == "w" then
                bodyVel.Velocity = hrp.CFrame.LookVector * speed
            elseif key == "s" then
                bodyVel.Velocity = -hrp.CFrame.LookVector * speed
            elseif key == "a" then
                bodyVel.Velocity = -hrp.CFrame.RightVector * speed
            elseif key == "d" then
                bodyVel.Velocity = hrp.CFrame.RightVector * speed
            elseif key == "q" then
                speed = math.max(10, speed - 10)
                print("Velocidad ↓", speed)
            elseif key == "e" then
                speed = speed + 10
                print("Velocidad ↑", speed)
            end
        end
    end)
else
    print("❌ Vuelo DESACTIVADO")
    if bodyGyro then bodyGyro:Destroy() end
    if bodyVel then bodyVel:Destroy() end
end

end)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions