
Key RequiredUniversal

-- Xdemic Fly and Noclip v2 (Mobile + PC Friendly)
-- Toggle with the on-screen button or press F on PC
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local player = Players.LocalPlayer
local camera = workspace.CurrentCamera
local flying = false
local speed = 60
local noclipEnabled = false
local bodyVelocity, bodyGyro
local connections = {}
-- Create GUI
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "XdemicFlyGUI"
screenGui.ResetOnSpawn = false
screenGui.Parent = player:WaitForChild("PlayerGui")
local mainFrame = Instance.new("Frame")
mainFrame.Size = UDim2.new(0, 280, 0, 220)
mainFrame.Position = UDim2.new(0, 20, 0.5, -110)
mainFrame.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
mainFrame.BorderSizePixel = 0
mainFrame.Active = true
mainFrame.Draggable = true
mainFrame.Parent = screenGui
local corner = Instance.new("UICorner")
corner.CornerRadius = UDim.new(0, 12)
corner.Parent = mainFrame
local title = Instance.new("TextLabel")
title.Size = UDim2.new(1, 0, 0, 40)
title.BackgroundTransparency = 1
title.Text = "Xdemic Fly & Noclip v2"
title.TextColor3 = Color3.fromRGB(0, 255, 100)
title.TextScaled = true
title.Font = Enum.Font.GothamBold
title.Parent = mainFrame
local toggleButton = Instance.new("TextButton")
toggleButton.Size = UDim2.new(0.9, 0, 0, 50)
toggleButton.Position = UDim2.new(0.05, 0, 0, 50)
toggleButton.BackgroundColor3 = Color3.fromRGB(0, 170, 0)
toggleButton.Text = "FLY: OFF"
toggleButton.TextColor3 = Color3.new(1,1,1)
toggleButton.TextScaled = true
toggleButton.Font = Enum.Font.GothamBold
toggleButton.Parent = mainFrame
local corner2 = Instance.new("UICorner")
corner2.CornerRadius = UDim.new(0, 8)
corner2.Parent = toggleButton
local speedLabel = Instance.new("TextLabel")
speedLabel.Size = UDim2.new(0.9, 0, 0, 30)
speedLabel.Position = UDim2.new(0.05, 0, 0, 110)
speedLabel.BackgroundTransparency = 1
speedLabel.Text = "Speed: " .. speed
speedLabel.TextColor3 = Color3.new(1,1,1)
speedLabel.TextScaled = true
speedLabel.Font = Enum.Font.Gotham
speedLabel.Parent = mainFrame
local speedSlider = Instance.new("TextButton")
speedSlider.Size = UDim2.new(0.9, 0, 0, 20)
speedSlider.Position = UDim2.new(0.05, 0, 0, 145)
speedSlider.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
speedSlider.Text = ""
speedSlider.Parent = mainFrame
local sliderFill = Instance.new("Frame")
sliderFill.Size = UDim2.new(speed/200, 0, 1, 0)
sliderFill.BackgroundColor3 = Color3.fromRGB(0, 255, 100)
sliderFill.BorderSizePixel = 0
sliderFill.Parent = speedSlider
local sliderCorner = Instance.new("UICorner")
sliderCorner.Parent = speedSlider
local fillCorner = Instance.new("UICorner")
fillCorner.Parent = sliderFill
local upButton = Instance.new("TextButton")
upButton.Size = UDim2.new(0.4, 0, 0, 40)
upButton.Position = UDim2.new(0.05, 0, 0, 175)
upButton.BackgroundColor3 = Color3.fromRGB(0, 120, 255)
upButton.Text = "↑ UP"
upButton.TextColor3 = Color3.new(1,1,1)
upButton.TextScaled = true
upButton.Parent = mainFrame
local downButton = Instance.new("TextButton")
downButton.Size = UDim2.new(0.4, 0, 0, 40)
downButton.Position = UDim2.new(0.55, 0, 0, 175)
downButton.BackgroundColor3 = Color3.fromRGB(0, 120, 255)
downButton.Text = "↓ DOWN"
downButton.TextColor3 = Color3.new(1,1,1)
downButton.TextScaled = true
downButton.Parent = mainFrame
-- Add corners to buttons
for _, btn in pairs({upButton, downButton}) do
local c = Instance.new("UICorner")
c.CornerRadius = UDim.new(0, 8)
c.Parent = btn
end
-- Flying functions
local function startFly()
if flying then return end
flying = true
noclipEnabled = true
local character = player.Character or player.CharacterAdded:Wait()
local root = character:WaitForChild("HumanoidRootPart")
local humanoid = character:WaitForChild("Humanoid")
humanoid.PlatformStand = true
bodyVelocity = Instance.new("BodyVelocity")
bodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bodyVelocity.Velocity = Vector3.new(0,0,0)
bodyVelocity.Parent = root
bodyGyro = Instance.new("BodyGyro")
bodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
bodyGyro.P = 12500
bodyGyro.Parent = root
-- Noclip
connections.noclip = RunService.Stepped:Connect(function()
if not flying then return end
for _, part in pairs(character:GetDescendants()) do
if part:IsA("BasePart") then
part.CanCollide = false
end
end
end)
end
local function stopFly()
if not flying then return end
flying = false
noclipEnabled = false
if bodyVelocity then bodyVelocity:Destroy() end
if bodyGyro then bodyGyro:Destroy() end
local character = player.Character
if character then
local humanoid = character:FindFirstChild("Humanoid")
if humanoid then humanoid.PlatformStand = false end
for _, part in pairs(character:GetDescendants()) do
if part:IsA("BasePart") then
part.CanCollide = true
end
end
end
for _, conn in pairs(connections) do
if conn then conn:Disconnect() end
end
connections = {}
end
-- Movement loop (works great on mobile with thumbstick)
RunService.RenderStepped:Connect(function()
if not flying or not bodyVelocity or not bodyGyro then return end
local character = player.Character
if not character then return end
local root = character:FindFirstChild("HumanoidRootPart")
if not root then return end
local moveVector = Vector3.new(0, 0, 0)
-- Use Roblox's built-in move vector (perfect for mobile thumbstick + PC WASD)
local controlModule = require(player:WaitForChild("PlayerScripts"):WaitForChild("PlayerModule"):WaitForChild("ControlModule"))
local dir = controlModule:GetMoveVector()
moveVector = moveVector + (camera.CFrame.LookVector * dir.Z * -1) -- Forward/Backward
moveVector = moveVector + (camera.CFrame.RightVector * dir.X) -- Left/Right
-- Up / Down from buttons (held)
if UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) and upButton.BackgroundColor3 == Color3.fromRGB(0, 200, 255) then
moveVector = moveVector + Vector3.new(0, 1, 0)
end
if UserInputService:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) and downButton.BackgroundColor3 == Color3.fromRGB(0, 200, 255) then
moveVector = moveVector - Vector3.new(0, 1, 0)
end
if moveVector.Magnitude > 0 then
moveVector = moveVector.Unit * speed
end
bodyVelocity.Velocity = moveVector
bodyGyro.CFrame = camera.CFrame
end)
-- Button logic
toggleButton.MouseButton1Click:Connect(function()
if flying then
stopFly()
toggleButton.Text = "FLY: OFF"
toggleButton.BackgroundColor3 = Color3.fromRGB(170, 0, 0)
else
startFly()
toggleButton.Text = "FLY: ON"
toggleButton.BackgroundColor3 = Color3.fromRGB(0, 170, 0)
end
end)
-- Speed slider (drag)
speedSlider.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
local conn
conn = UserInputService.InputChanged:Connect(function(moveInput)
if moveInput.UserInputType == Enum.UserInputType.MouseMovement or moveInput.UserInputType == Enum.UserInputType.Touch then
local mousePos = UserInputService:GetMouseLocation().X
local sliderPos = speedSlider.AbsolutePosition.X
local sliderWidth = speedSlider.AbsoluteSize.X
local percent = math.clamp((mousePos - sliderPos) / sliderWidth, 0, 1)
speed = math.floor(30 + percent * 170) -- 30 to 200
sliderFill.Size = UDim2.new(percent, 0, 1, 0)
speedLabel.Text = "Speed: " .. speed
end
end)
local releaseConn
releaseConn = UserInputService.InputEnded:Connect(function(endInput)
if endInput.UserInputType == Enum.UserInputType.MouseButton1 or endInput.UserInputType == Enum.UserInputType.Touch then
conn:Disconnect()
releaseConn:Disconnect()
end
end)
end
end)
-- Up / Down hold support (visual feedback)
upButton.MouseButton1Down:Connect(function() upButton.BackgroundColor3 = Color3.fromRGB(0, 200, 255) end)
upButton.MouseButton1Up:Connect(function() upButton.BackgroundColor3 = Color3.fromRGB(0, 120, 255) end)
upButton.MouseLeave:Connect(function() upButton.BackgroundColor3 = Color3.fromRGB(0, 120, 255) end)
downButton.MouseButton1Down:Connect(function() downButton.BackgroundColor3 = Color3.fromRGB(0, 200, 255) end)
downButton.MouseButton1Up:Connect(function() downButton.BackgroundColor3 = Color3.fromRGB(0, 120, 255) end)
downButton.MouseLeave:Connect(function() downButton.BackgroundColor3 = Color3.fromRGB(0, 120, 255) end)
-- PC hotkey (F)
UserInputService.InputBegan:Connect(function(input, gp)
if gp then return end
if input.KeyCode == Enum.KeyCode.F then
toggleButton.MouseButton1Click:Fire()
end
end)
print("Xdemic Fly and Noclip v2 (Mobile Ready) loaded!")
print("Use the on-screen GUI or press F on PC")No comments yet for this script.



