Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ScreenGui = Instance.new("ScreenGui")
- local FlyFrame = Instance.new("Frame")
- local TextButton = Instance.new("TextButton")
- local TextLabel = Instance.new("TextLabel")
- local TextLabel_2 = Instance.new("TextLabel")
- ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- FlyFrame.Name = "FlyFrame"
- FlyFrame.Parent = ScreenGui
- FlyFrame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- FlyFrame.Position = UDim2.new(0.363351613, 0, 0.380106568, 0)
- FlyFrame.Size = UDim2.new(0, 290, 0, 180)
- FlyFrame.Style = Enum.FrameStyle.ChatBlue
- TextButton.Parent = FlyFrame
- TextButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextButton.Position = UDim2.new(0.106896549, 0, 0.477777749, 0)
- TextButton.Size = UDim2.new(0, 200, 0, 50)
- TextButton.Style = Enum.ButtonStyle.RobloxRoundDefaultButton
- TextButton.Font = Enum.Font.Cartoon
- TextButton.Text = "Fly"
- TextButton.TextColor3 = Color3.fromRGB(0, 0, 0)
- TextButton.TextSize = 40.000
- TextButton.TextWrapped = true
- TextButton.MouseButton1Down:connect(function()
- repeat wait()
- until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("Torso") and game.Players.LocalPlayer.Character:findFirstChild("Humanoid")
- local mouse = game.Players.LocalPlayer:GetMouse()
- repeat wait() until mouse
- local plr = game.Players.LocalPlayer
- local torso = plr.Character.Torso
- local flying = true
- local deb = true
- local ctrl = {f = 0, b = 0, l = 0, r = 0}
- local lastctrl = {f = 0, b = 0, l = 0, r = 0}
- local maxspeed = 100
- local speed = 0
- function Fly()
- local bg = Instance.new("BodyGyro", torso)
- bg.P = 9e4
- bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
- bg.cframe = torso.CFrame
- local bv = Instance.new("BodyVelocity", torso)
- bv.velocity = Vector3.new(0,0.1,0)
- bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
- repeat wait()
- plr.Character.Humanoid.PlatformStand = true
- if ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0 then
- speed = speed+.5+(speed/maxspeed)
- if speed > maxspeed then
- speed = maxspeed
- end
- elseif not (ctrl.l + ctrl.r ~= 0 or ctrl.f + ctrl.b ~= 0) and speed ~= 0 then
- speed = speed-1
- if speed < 0 then
- speed = 0
- end
- end
- if (ctrl.l + ctrl.r) ~= 0 or (ctrl.f + ctrl.b) ~= 0 then
- bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
- lastctrl = {f = ctrl.f, b = ctrl.b, l = ctrl.l, r = ctrl.r}
- elseif (ctrl.l + ctrl.r) == 0 and (ctrl.f + ctrl.b) == 0 and speed ~= 0 then
- bv.velocity = ((game.Workspace.CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game.Workspace.CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game.Workspace.CurrentCamera.CoordinateFrame.p))*speed
- else
- bv.velocity = Vector3.new(0,0.1,0)
- end
- bg.cframe = game.Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
- until not flying
- ctrl = {f = 0, b = 0, l = 0, r = 0}
- lastctrl = {f = 0, b = 0, l = 0, r = 0}
- speed = 0
- bg:Destroy()
- bv:Destroy()
- plr.Character.Humanoid.PlatformStand = false
- end
- mouse.KeyDown:connect(function(key)
- if key:lower() == "e" then
- if flying then flying = false
- else
- flying = true
- Fly()
- end
- elseif key:lower() == "w" then
- ctrl.f = 1
- elseif key:lower() == "s" then
- ctrl.b = -1
- elseif key:lower() == "a" then
- ctrl.l = -1
- elseif key:lower() == "d" then
- ctrl.r = 1
- end
- end)
- mouse.KeyUp:connect(function(key)
- if key:lower() == "w" then
- ctrl.f = 0
- elseif key:lower() == "s" then
- ctrl.b = 0
- elseif key:lower() == "a" then
- ctrl.l = 0
- elseif key:lower() == "d" then
- ctrl.r = 0
- end
- end)
- Fly()
- end)
- TextLabel.Parent = FlyFrame
- TextLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel.BackgroundTransparency = 1.000
- TextLabel.Position = UDim2.new(0.106896549, 0, 0.0500000007, 0)
- TextLabel.Size = UDim2.new(0, 200, 0, 50)
- TextLabel.Font = Enum.Font.Cartoon
- TextLabel.Text = "Fly Gui"
- TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)
- TextLabel.TextScaled = true
- TextLabel.TextSize = 14.000
- TextLabel.TextWrapped = true
- TextLabel_2.Parent = FlyFrame
- TextLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- TextLabel_2.BackgroundTransparency = 1.000
- TextLabel_2.Position = UDim2.new(0.107443348, 0, 0.923075914, 0)
- TextLabel_2.Size = UDim2.new(0, 200, 0, 18)
- TextLabel_2.Font = Enum.Font.Cartoon
- TextLabel_2.Text = "Creds: Brehtato"
- TextLabel_2.TextColor3 = Color3.fromRGB(0, 0, 0)
- TextLabel_2.TextScaled = true
- TextLabel_2.TextSize = 14.000
- TextLabel_2.TextWrapped = true
- local function FEXB_fake_script()
- local script = Instance.new('Script', ScreenGui)
- frame = script.Parent.FlyFrame
- frame.Draggable = true
- frame.Active = true
- frame.Selectable = true
- end
- coroutine.wrap(FEXB_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement