Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Made by Kirchohex tt:coolkircho
- local ScreenGui = Instance.new("ScreenGui")
- local main = Instance.new("Frame")
- local title = Instance.new("TextLabel")
- local FlyTest = Instance.new("TextButton")
- local Close = Instance.new("TextButton")
- local openmain = Instance.new("Frame")
- local open = Instance.new("TextButton")
- --Properties:
- ScreenGui.Parent = game.CoreGui
- main.Name = "main"
- main.Parent = ScreenGui
- main.BackgroundColor3 = Color3.fromRGB(89, 89, 89)
- main.Position = UDim2.new(0.702230632, 0, -0.00167222321, 0)
- main.Size = UDim2.new(0, 368, 0, 212)
- main.Visible = false
- main.Active = True
- main.Draggable =true
- title.Name = "title"
- title.Parent = main
- title.BackgroundColor3 = Color3.fromRGB(107, 106, 106)
- title.BorderColor3 = Color3.fromRGB(80, 79, 255)
- title.Size = UDim2.new(0, 368, 0, 31)
- title.Font = Enum.Font.SciFi
- title.Text = "Kirchohex's hub"
- title.TextColor3 = Color3.fromRGB(0, 0, 0)
- title.TextSize = 14.000
- FlyTest.Name = "FlyTest"
- FlyTest.Parent = main
- FlyTest.BackgroundColor3 = Color3.fromRGB(106, 69, 255)
- FlyTest.Position = UDim2.new(0, 0, 0.22169812, 0)
- FlyTest.Size = UDim2.new(0, 110, 0, 50)
- FlyTest.Font = Enum.Font.Ubuntu
- FlyTest.Text = "FlyTest"
- FlyTest.TextColor3 = Color3.fromRGB(0, 0, 0)
- FlyTest.TextSize = 14.000
- FlyTest.MouseButton1Down:connect(function()
- repeat wait()
- until game.Players.LocalPlayer and game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:findFirstChild("HumanoidRootPart") 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.HumanoidRootPart
- 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 = 50
- 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)
- Close.Name = "Close"
- Close.Parent = main
- Close.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Close.Position = UDim2.new(0.861413002, 0, 0.839622557, 0)
- Close.Size = UDim2.new(0, 51, 0, 34)
- Close.Font = Enum.Font.Gotham
- Close.Text = "Close"
- Close.TextColor3 = Color3.fromRGB(0, 0, 0)
- Close.TextSize = 14.000
- Close.MouseButton1Down:connect(function()
- main.Visible = false
- openmain.Visible = true
- end)
- openmain.Name = "openmain"
- openmain.Parent = ScreenGui
- openmain.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- openmain.Position = UDim2.new(0.927250683, 0, 0.367892921, 0)
- openmain.Size = UDim2.new(0, 78, 0, 42)
- openmain.Active = true
- openmain.Draggable = true
- open.Name = "open"
- open.Parent = openmain
- open.BackgroundColor3 = Color3.fromRGB(0, 162, 0)
- open.Position = UDim2.new(-3.12924385e-07, 0, 1.1920929e-07, 0)
- open.Size = UDim2.new(0, 78, 0, 42)
- open.Font = Enum.Font.RobotoMono
- open.Text = "Open"
- open.TextColor3 = Color3.fromRGB(0, 0, 0)
- open.TextSize = 14.000
- open.MouseButton1Down:connect(function()
- openmain.Visible = false
- main.Visible = true
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement