Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Joystick Fly GUI for Delta Executor (Mobile Ready)
- -- By ChatGPT ๐
- if game:GetService("CoreGui"):FindFirstChild("FlyGui") then
- game:GetService("CoreGui").FlyGui:Destroy()
- end
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local player = Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local root = character:WaitForChild("HumanoidRootPart")
- local flying = false
- local speed = 50
- local direction = Vector3.zero
- -- UI
- local gui = Instance.new("ScreenGui")
- gui.Name = "FlyGui"
- gui.Parent = game:GetService("CoreGui")
- -- Helper function for making buttons
- local function makeButton(name, pos, text)
- local btn = Instance.new("TextButton")
- btn.Size = UDim2.new(0, 60, 0, 60)
- btn.Position = pos
- btn.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- btn.TextColor3 = Color3.fromRGB(255, 255, 255)
- btn.Font = Enum.Font.SourceSansBold
- btn.TextSize = 20
- btn.Text = text
- btn.Name = name
- btn.Parent = gui
- return btn
- end
- -- Fly toggle + speed button
- local toggle = makeButton("Toggle", UDim2.new(0.05, 0, 0.8, 0), "Fly: OFF")
- toggle.Size = UDim2.new(0, 120, 0, 50)
- local speedBtn = makeButton("Speed", UDim2.new(0.05, 0, 0.7, 0), "Speed: "..speed)
- speedBtn.Size = UDim2.new(0, 200, 0, 50)
- -- Joystick buttons
- local forward = makeButton("Forward", UDim2.new(0.8, 0, 0.6, 0), "โ")
- local back = makeButton("Back", UDim2.new(0.8, 0, 0.75, 0), "โ")
- local left = makeButton("Left", UDim2.new(0.73, 0, 0.675, 0), "โ")
- local right = makeButton("Right", UDim2.new(0.87, 0, 0.675, 0), "โ")
- local up = makeButton("Up", UDim2.new(0.93, 0, 0.6, 0), "โค")
- local down = makeButton("Down", UDim2.new(0.93, 0, 0.75, 0), "โค")
- -- Toggle fly
- toggle.MouseButton1Click:Connect(function()
- flying = not flying
- toggle.Text = flying and "Fly: ON" or "Fly: OFF"
- end)
- -- Speed adjuster
- speedBtn.MouseButton1Click:Connect(function()
- speed = speed + 25
- if speed > 200 then
- speed = 25
- end
- speedBtn.Text = "Speed: " .. speed
- end)
- -- Direction controls
- forward.MouseButton1Down:Connect(function() direction = Vector3.new(0,0,-1) end)
- forward.MouseButton1Up:Connect(function() direction = Vector3.zero end)
- back.MouseButton1Down:Connect(function() direction = Vector3.new(0,0,1) end)
- back.MouseButton1Up:Connect(function() direction = Vector3.zero end)
- left.MouseButton1Down:Connect(function() direction = Vector3.new(-1,0,0) end)
- left.MouseButton1Up:Connect(function() direction = Vector3.zero end)
- right.MouseButton1Down:Connect(function() direction = Vector3.new(1,0,0) end)
- right.MouseButton1Up:Connect(function() direction = Vector3.zero end)
- up.MouseButton1Down:Connect(function() direction = Vector3.new(0,1,0) end)
- up.MouseButton1Up:Connect(function() direction = Vector3.zero end)
- down.MouseButton1Down:Connect(function() direction = Vector3.new(0,-1,0) end)
- down.MouseButton1Up:Connect(function() direction = Vector3.zero end)
- -- Fly loop
- RunService.RenderStepped:Connect(function()
- if flying and character and root then
- root.Velocity = direction * speed
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment