Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i,v in pairs(game:GetService("CoreGui"):GetChildren()) do
- if v.Name == "AWFly" then
- v:Destroy()
- end
- end
- local AWFly = Instance.new("ScreenGui")
- local FlyFrame = Instance.new("Frame")
- local UICorner = Instance.new("UICorner")
- local DropShadowHolder = Instance.new("Frame")
- local DropShadow = Instance.new("ImageLabel")
- local Icon = Instance.new("ImageLabel")
- local Text = Instance.new("TextLabel")
- local Fly = Instance.new("TextButton")
- local UICorner_2 = Instance.new("UICorner")
- local plus = Instance.new("TextButton")
- local UICorner_3 = Instance.new("UICorner")
- local mine = Instance.new("TextButton")
- local UICorner_4 = Instance.new("UICorner")
- local speed = Instance.new("TextLabel")
- local UICorner_5 = Instance.new("UICorner")
- AWFly.Name = "AWFly"
- AWFly.Parent = game:GetService("CoreGui")
- FlyFrame.Name = "FlyFrame"
- FlyFrame.Parent = AWFly
- FlyFrame.BackgroundColor3 = Color3.fromRGB(47, 47, 47)
- FlyFrame.BorderColor3 = Color3.fromRGB(0, 0, 0)
- FlyFrame.BorderSizePixel = 0
- FlyFrame.Position = UDim2.new(0.832056165, 0, 0.319567978, 0)
- FlyFrame.Size = UDim2.new(0.135376751, 0, 0.383735716, 0)
- UICorner.Parent = FlyFrame
- DropShadowHolder.Name = "DropShadowHolder"
- DropShadowHolder.Parent = FlyFrame
- DropShadowHolder.BackgroundTransparency = 1.000
- DropShadowHolder.BorderSizePixel = 0
- DropShadowHolder.Size = UDim2.new(1, 0, 1, 0)
- DropShadowHolder.ZIndex = 0
- DropShadow.Name = "DropShadow"
- DropShadow.Parent = DropShadowHolder
- DropShadow.AnchorPoint = Vector2.new(0.5, 0.5)
- DropShadow.BackgroundTransparency = 1.000
- DropShadow.BorderSizePixel = 0
- DropShadow.Position = UDim2.new(0.5, 0, 0.5, 0)
- DropShadow.Size = UDim2.new(1, 47, 1, 47)
- DropShadow.ZIndex = 0
- DropShadow.Image = "rbxassetid://6014261993"
- DropShadow.ImageColor3 = Color3.fromRGB(0, 0, 0)
- DropShadow.ImageTransparency = 0.500
- DropShadow.ScaleType = Enum.ScaleType.Slice
- DropShadow.SliceCenter = Rect.new(49, 49, 450, 450)
- Icon.Name = "Icon"
- Icon.Parent = FlyFrame
- Icon.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Icon.BorderColor3 = Color3.fromRGB(0, 0, 0)
- Icon.BorderSizePixel = 0
- Icon.Position = UDim2.new(0.344339609, 0, 0.205298007, 0)
- Icon.Size = UDim2.new(0.311320752, 0, 0.218543053, 0)
- Icon.Image = "http://www.roblox.com/asset/?id=17411013742"
- Text.Name = "Text"
- Text.Parent = FlyFrame
- Text.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- Text.BackgroundTransparency = 1.000
- Text.BorderColor3 = Color3.fromRGB(0, 0, 0)
- Text.BorderSizePixel = 0
- Text.Position = UDim2.new(0.325471699, 0, 0, 0)
- Text.Size = UDim2.new(0.349056602, 0, 0.165562913, 0)
- Text.Font = Enum.Font.SourceSansBold
- Text.Text = "飞行"
- Text.TextColor3 = Color3.fromRGB(255, 255, 255)
- Text.TextScaled = true
- Text.TextSize = 14.000
- Text.TextWrapped = true
- Text.TextXAlignment = Enum.TextXAlignment.Left
- Fly.Name = "Fly"
- Fly.Parent = FlyFrame
- Fly.BackgroundColor3 = Color3.fromRGB(39, 39, 39)
- Fly.BorderColor3 = Color3.fromRGB(0, 0, 0)
- Fly.BorderSizePixel = 0
- Fly.Position = UDim2.new(0.0283018872, 0, 0.778145671, 0)
- Fly.Size = UDim2.new(0.943396211, 0, 0.165562913, 0)
- Fly.Font = Enum.Font.SourceSansBold
- Fly.Text = "起飞"
- Fly.TextColor3 = Color3.fromRGB(255, 255, 255)
- Fly.TextScaled = true
- Fly.TextSize = 14.000
- Fly.TextWrapped = true
- UICorner_2.CornerRadius = UDim.new(0, 30)
- UICorner_2.Parent = Fly
- plus.Name = "plus"
- plus.Parent = FlyFrame
- plus.BackgroundColor3 = Color3.fromRGB(39, 39, 39)
- plus.BorderColor3 = Color3.fromRGB(0, 0, 0)
- plus.BorderSizePixel = 0
- plus.Position = UDim2.new(0.183962271, 0, 0.427152306, 0)
- plus.Size = UDim2.new(0.235849053, 0, 0.165562913, 0)
- plus.Font = Enum.Font.SourceSans
- plus.Text = "+1"
- plus.TextColor3 = Color3.fromRGB(255, 255, 255)
- plus.TextScaled = true
- plus.TextSize = 14.000
- plus.TextWrapped = true
- UICorner_3.CornerRadius = UDim.new(0, 30)
- UICorner_3.Parent = plus
- mine.Name = "mine"
- mine.Parent = FlyFrame
- mine.BackgroundColor3 = Color3.fromRGB(39, 39, 39)
- mine.BorderColor3 = Color3.fromRGB(0, 0, 0)
- mine.BorderSizePixel = 0
- mine.Position = UDim2.new(0.580188692, 0, 0.427152306, 0)
- mine.Size = UDim2.new(0.235849053, 0, 0.165562913, 0)
- mine.Font = Enum.Font.SourceSans
- mine.Text = "-1"
- mine.TextColor3 = Color3.fromRGB(255, 255, 255)
- mine.TextScaled = true
- mine.TextSize = 14.000
- mine.TextWrapped = true
- UICorner_4.CornerRadius = UDim.new(0, 30)
- UICorner_4.Parent = mine
- speed.Name = "speed"
- speed.Parent = FlyFrame
- speed.BackgroundColor3 = Color3.fromRGB(39, 39, 39)
- speed.BorderColor3 = Color3.fromRGB(0, 0, 0)
- speed.BorderSizePixel = 0
- speed.Position = UDim2.new(0.183962271, 0, 0.594370842, 0)
- speed.Size = UDim2.new(0.632075489, 0, 0.168874174, 0)
- speed.Font = Enum.Font.SourceSans
- speed.Text = "速度: 1"
- speed.TextColor3 = Color3.fromRGB(255, 255, 255)
- speed.TextScaled = true
- speed.TextSize = 14.000
- speed.TextWrapped = true
- UICorner_5.CornerRadius = UDim.new(0, 10)
- UICorner_5.Parent = speed
- speeds = 1
- local speaker = game:GetService("Players").LocalPlayer
- local chr = speaker.Character
- local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
- nowe = false
- FlyFrame.Active = true -- main = gui
- FlyFrame.Draggable = true
- Fly.MouseButton1Down:connect(function()
- if nowe == true then nowe = false
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing,true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Flying,true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall,true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping,true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed,true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics,true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding,true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running,true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics,true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated,true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.StrafingNoPhysics,true)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming,true)
- speaker.Character.Humanoid:ChangeState(Enum.HumanoidStateType.RunningNoPhysics)
- else
- nowe = true
- for i = 1, speeds do
- spawn(function()
- local hb = game:GetService("RunService").Heartbeat
- tpwalking = true
- local chr = speaker.Character
- local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
- while tpwalking and hb:Wait() and chr and hum and hum.Parent do
- if hum.MoveDirection.Magnitude > 0 then
- chr:TranslateBy(hum.MoveDirection)
- end
- end
- end)
- end
- speaker.Character.Animate.Disabled = true
- local Char = speaker.Character
- local Hum = Char:FindFirstChildOfClass("Humanoid") or Char:FindFirstChildOfClass("AnimationController")
- for i,v in next, Hum:GetPlayingAnimationTracks() do
- v:AdjustSpeed(0)
- end
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing,false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown,false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Flying,false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall,false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp,false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping,false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Landed,false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics,false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding,false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll,false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running,false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics,false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated,false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.StrafingNoPhysics,false)
- speaker.Character.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming,false)
- speaker.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Swimming)
- end
- local plr = speaker
- local UpperTorso = plr.Character.LowerTorso
- 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
- local bg = Instance.new("BodyGyro", UpperTorso)
- bg.P = 9e4
- bg.maxTorque = Vector3.new(9e9, 9e9, 9e9)
- bg.cframe = UpperTorso.CFrame
- local bv = Instance.new("BodyVelocity", UpperTorso)
- bv.velocity = Vector3.new(0,0.1,0)
- bv.maxForce = Vector3.new(9e9, 9e9, 9e9)
- if nowe == true then
- plr.Character.Humanoid.PlatformStand = true
- end
- while nowe == true or game:GetService("Players").LocalPlayer.Character.Humanoid.Health == 0 do
- wait()
- 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:GetService("Workspace").CurrentCamera.CoordinateFrame.lookVector * (ctrl.f+ctrl.b)) + ((game:GetService("Workspace").CurrentCamera.CoordinateFrame * CFrame.new(ctrl.l+ctrl.r,(ctrl.f+ctrl.b)*.2,0).p) - game:GetService("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:GetService("Workspace").CurrentCamera.CoordinateFrame.lookVector * (lastctrl.f+lastctrl.b)) + ((game:GetService("Workspace").CurrentCamera.CoordinateFrame * CFrame.new(lastctrl.l+lastctrl.r,(lastctrl.f+lastctrl.b)*.2,0).p) - game:GetService("Workspace").CurrentCamera.CoordinateFrame.p))*speed
- else
- bv.velocity = Vector3.new(0,0,0)
- end
- bg.cframe = game:GetService("Workspace").CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad((ctrl.f+ctrl.b)*50*speed/maxspeed),0,0)
- end
- 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
- speaker.Character.Animate.Disabled = false
- tpwalking = false
- end)
- game:GetService("Players").LocalPlayer.CharacterAdded:Connect(function(char)
- wait(0.7)
- speaker.Character.Humanoid.PlatformStand = false
- speaker.Character.Animate.Disabled = false
- end)
- plus.MouseButton1Down:connect(function()
- speeds = speeds + 1
- speed.Text = '速度: '..speeds
- if nowe == true then
- tpwalking = false
- for i = 1, speeds do
- spawn(function()
- local hb = game:GetService("RunService").Heartbeat
- tpwalking = true
- local chr = speaker.Character
- local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
- while tpwalking and hb:Wait() and chr and hum and hum.Parent do
- if hum.MoveDirection.Magnitude > 0 then
- chr:TranslateBy(hum.MoveDirection)
- end
- end
- end)
- end
- end
- end)
- mine.MouseButton1Down:connect(function()
- if speeds == 1 then
- speed.Text = '速度无法小于1!'
- wait(1)
- speed.Text = '速度: '..speeds
- else
- speeds = speeds - 1
- speed.Text = '速度: '..speeds
- if nowe == true then
- tpwalking = false
- for i = 1, speeds do
- spawn(function()
- local hb = game:GetService("RunService").Heartbeat
- tpwalking = true
- local chr = speaker.Character
- local hum = chr and chr:FindFirstChildWhichIsA("Humanoid")
- while tpwalking and hb:Wait() and chr and hum and hum.Parent do
- if hum.MoveDirection.Magnitude > 0 then
- chr:TranslateBy(hum.MoveDirection)
- end
- end
- end)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement