Universal Script 📌
2.4k Views
143.0k Executions

Fly gui

100K executions
Universal Script 📌
Xprssstturan
Xprssstturan100K executions
3 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

A fly gui made by me.

View Raw
local P,R,LP = game:GetService("Players"),game:GetService("RunService"),game:GetService("Players").LocalPlayer
local SG = Instance.new("ScreenGui",LP:WaitForChild("PlayerGui")) SG.ResetOnSpawn = false
local MF = Instance.new("Frame",SG) MF.Size,MF.Position,MF.BackgroundColor3,MF.Active,MF.Draggable = UDim2.new(0,140,0,140),UDim2.new(0.4,0,0.4,0),Color3.fromRGB(30,30,30),true,true
local MS = Instance.new("UIStroke",MF) MS.Thickness = 2 local T = Instance.new("TextLabel",MF) T.Size,T.Text,T.TextColor3,T.BackgroundColor3 = UDim2.new(1,-20,0,20),"Simple Fly",Color3.new(1,1,1),Color3.fromRGB(45,45,45)
local SB = Instance.new("TextButton",MF) SB.Size,SB.Position,SB.Text,SB.BackgroundColor3,SB.TextColor3 = UDim2.new(0,20,0,20),UDim2.new(1,-20,0,0),"âš™",Color3.fromRGB(45,45,45),Color3.new(1,1,1)
local SF = Instance.new("Frame",SG) SF.Size,SF.Position,SF.BackgroundColor3,SF.Active,SF.Draggable,SF.Visible = UDim2.new(0,140,0,120),UDim2.new(0.55,0,0.4,0),Color3.fromRGB(35,35,35),true,true,false
local SS = Instance.new("UIStroke",SF) SS.Thickness = 2 SB.MouseButton1Click:Connect(function() SF.Visible = not SF.Visible end)

local flying,noclip,flySpeed,rbC,fC,sC,animE = false,false,50,nil,nil,nil,nil
local CM = require(LP.PlayerScripts:WaitForChild("PlayerModule")):GetControls()

local function toggleRB(enable)
    if enable then if rbC then return end rbC = R.RenderStepped:Connect(function() local col = Color3.fromHSV((tick()%4)/4,1,1) MS.Color,SS.Color = col,col end)
    else if rbC then rbC:Disconnect() rbC = nil end MS.Color,SS.Color = Color3.fromRGB(60,60,60),Color3.fromRGB(80,80,80) end
end

local function startF()
    local c = LP.Character or LocalPlayer.CharacterAdded:Wait() local h,r = c:WaitForChild("Humanoid"),c:WaitForChild("HumanoidRootPart")
    for _,s in pairs(r:GetChildren()) do if s:IsA("Sound") and (s.Name=="Swimming" or s.Name=="Splash") then s.Volume=0 s:Stop() end end
    animE = c:FindFirstChild("Animate") if animE then animE.Enabled = false end
    local am = h:FindFirstChildOfClass("Animator") if am then for _,t in pairs(am:GetPlayingAnimationTracks()) do t:Stop() end end
    local bv,bg = Instance.new("BodyVelocity",r),Instance.new("BodyGyro",r) bv.MaxForce,bg.MaxTorque = Vector3.new(1e5,1e5,1e5),Vector3.new(1e5,1e5,1e5)
    fC = R.RenderStepped:Connect(function() if not flying or not r.Parent then return end h:ChangeState(Enum.HumanoidStateType.Physics)
        local mv,cam = CM:GetMoveVector(),workspace.CurrentCamera.CFrame local vel = Vector3.new(0,0,0)
        if mv.X ~= 0 or mv.Z ~= 0 then vel = (cam.RightVector * mv.X + cam.LookVector * -mv.Z) * flySpeed end
        bv.Velocity,bg.CFrame = vel,cam
    end)
    sC = c.DescendantAdded:Connect(function(d) if d:IsA("Sound") and (d.Name=="Swimming" or d.Name=="Splash") then d.Volume=0 d:Stop() end end)
end

local function stopF()
    if fC then fC:Disconnect() end if sC then sC:Disconnect() end if animE then animE.Enabled = true end
    local c = LP.Character if c then local h,r = c:FindFirstChild("Humanoid"),c:FindFirstChild("HumanoidRootPart")
        if h then h:ChangeState(Enum.HumanoidStateType.Running) end
        if r then local bv,bg = r:FindFirstChildOfClass("BodyVelocity"),r:FindFirstChildOfClass("BodyGyro") if bv then bv:Destroy() end if bg then bg:Destroy() end end
    end
end

R.Stepped:Connect(function() if noclip and LP.Character then for _,p in pairs(LP.Character:GetDescendants()) do if p:IsA("BasePart") then p.CanCollide = false end end end end)
local function antiFall(c)


Comments

4
Log in to join the conversation. Login
De*666's profile picture
De*6662 months ago

Noclip advice: Before turning Noclip ON, save each part's original "CanCollide" value. When Noclip is turned OFF, restore "CanCollide" to those saved values. That way, turning Noclip off returns the collision settings to exactly how they were before.

1
Xprssstturan's profile picture
XprssstturanUploader1 month ago

@De*666 Thanks for suggesting! Still learning

1
De*666's profile picture
De*6662 months ago

I tested it, everything is fine except for nocoip. Any advice would be...

1
De*666's profile picture
De*6662 months ago

May I test it?

1