-- VARIABLES PRINCIPALES
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local Mouse = LocalPlayer:GetMouse()
local RunService = game:GetService("RunService")
local Flying = false
local Noclip = false
local Speed = 50
-- 1. CREACIÓN DE LA INTERFAZ "Josué v2"
local ScreenGui = Instance.new("ScreenGui")
local MainFrame = Instance.new("Frame")
local TitleLabel = Instance.new("TextLabel")
ScreenGui.Name = "JosueGui"
ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")
ScreenGui.ResetOnSpawn = false
-- Cuadro negro
MainFrame.Name = "MainFrame"
MainFrame.Parent = ScreenGui
MainFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0) -- Negro
MainFrame.BackgroundTransparency = 0.2 -- Ligeramente transparente
MainFrame.Position = UDim2.new(0.05, 0, 0.1, 0) -- Esquina superior izquierda
MainFrame.Size = UDim2.new(0, 150, 0, 50)
MainFrame.Active = true
MainFrame.Draggable = true -- Puedes moverlo con el mouse
-- Texto "Josué v2"
TitleLabel.Name = "TitleLabel"
TitleLabel.Parent = MainFrame
TitleLabel.BackgroundTransparency = 1
TitleLabel.Size = UDim2.new(1, 0, 1, 0)
TitleLabel.Font = Enum.Font.SourceSansBold
TitleLabel.Text = "Josué v2"
TitleLabel.TextColor3 = Color3.fromRGB(255, 255, 255) -- Blanco
TitleLabel.TextSize = 24
-- 2. LÓGICA DE FLY Y NOCLIP (Se activa/desactiva con la tecla E)
Mouse.KeyDown:Connect(function(key)
if key:lower() == "e" then
Flying = not Flying
Noclip = Flying -- El noclip se activa junto con el fly
local Character = LocalPlayer.Character
if not Character then return end
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
local Root = Character:FindFirstChild("HumanoidRootPart")
if not Root or not Humanoid then return end
if Flying then
-- Crear fuerza para flotar
local TGV = Instance.new("BodyVelocity", Root)
TGV.Name = "FlyVelocity"
TGV.Velocity = Vector3.new(0, 0, 0)
TGV.MaxForce = Vector3.new(9e9, 9e9, 9e9)
-- Bucle de movimiento
task.spawn(function()
while Flying and Character and Root do
RunService.RenderStepped:Wait()
local Camera = workspace.CurrentCamera
local MoveDir = Vector3.new(0,0,0)
-- Controles de dirección basados en la cámara
if Mouse.KeyDown:Connect(function(k) return k end) then end -- Mantiene el foco
-- Movimiento simple hacia adelante/atrás
local UserInputService = game:GetService("UserInputService")
if UserInputService:IsKeyDown(Enum.KeyCode.W) then
MoveDir = MoveDir + Camera.CFrame.LookVector
end
if UserInputService:IsKeyDown(Enum.KeyCode.S) then
MoveDir = MoveDir - Camera.CFrame.LookVector
end
if UserInputService:IsKeyDown(Enum.KeyCode.A) then
MoveDir = MoveDir - Camera.CFrame.RightVector
end
if UserInputService:IsKeyDown(Enum.KeyCode.D) then
MoveDir = MoveDir + Camera.CFrame.RightVector
end
TGV.Velocity = MoveDir.Unit * Speed
if MoveDir == Vector3.new(0,0,0) then
TGV.Velocity = Vector3.new(0,0,0)
end
end
end)
else
-- Limpiar fuerzas al apagar
if Root:FindFirstChild("FlyVelocity") then
Root.FlyVelocity:Destroy()
end
end
end
end)
-- Bucle independiente para el NOCLIP (Evita colisiones)
RunService.Stepped:Connect(function()
if Noclip then
local Character = LocalPlayer.Character
if Character then
for _, part in pairs(Character:GetChildren()) do
if part:IsA("BasePart") then
part.CanCollide = false
end
end
end
end
end)
Comments
No comments yet
Be the first to share your thoughts!