Run it
Copy the script and paste it into your executor.
Players = :()
RunService = :()
TweenService = :()
ContextActionService = :()
Lighting = :()
player = Players.LocalPlayer
playerGui = player:()
camera = .CurrentCamera
flying =
flySpeed =
verticalSpeed =
bodyGyro, bodyVelocity
joyInput = .()
joySmooth = .()
upPressed =
downPressed =
JOY_RADIUS =
JOY_SPRING_K =
JOY_DAMPING =
blur = .()
blur.Size =
blur.Parent = Lighting
(size)
blur.Size = size
flyGui = .()
flyGui.Name =
flyGui.ResetOnSpawn =
flyGui.Parent = playerGui
flyFrame = .()
flyFrame.Size = .(, , , )
flyFrame.Position = .(, , , )
flyFrame.BackgroundTransparency =
flyFrame.BackgroundColor3 = .(, , )
flyFrame.Active =
flyFrame.ClipsDescendants =
flyFrame.Parent = flyGui
flyCorner = .()
flyCorner.CornerRadius = .(, )
flyCorner.Parent = flyFrame
flyStroke = .()
flyStroke.Thickness =
flyStroke.Color = .(, , )
flyStroke.Transparency =
flyStroke.Parent = flyFrame
flyButton = .()
flyButton.Size = .(, , , )
flyButton.Position = .(, -, , -)
flyButton.BackgroundTransparency =
flyButton.Text =
flyButton.TextColor3 = .(, , )
flyButton.FontFace = Font.(.Font.GothamBold)
flyButton.TextSize =
flyButton.Parent = flyFrame
()
TweenService:(flyStroke, TweenInfo.(, .EasingStyle.Sine, .EasingDirection.InOut, -, ), {
Transparency =
}):()
()
dragTarget = flyFrame.Position
dragPos = flyFrame.Position
dragVel = .()
()
delta = .(dragTarget.X.Offset - dragPos.X.Offset, dragTarget.Y.Offset - dragPos.Y.Offset)
dragVel = dragVel + delta *
dragVel = dragVel *
dragPos = .(, dragPos.X.Offset + dragVel.X, , dragPos.Y.Offset + dragVel.Y)
flyFrame.Position = dragPos
dragging =
flyFrame.InputBegan:((input)
input.UserInputType ~= .UserInputType.MouseButton1 input.UserInputType ~= .UserInputType.Touch
dragging =
dragTarget = flyFrame.Position
dragVel = .()
TweenService:(flyFrame, TweenInfo.(), {Size = .(, , , )}):()
)
flyFrame.InputChanged:((input)
dragging
delta = input.Position - .(
input.Position.X - (dragTarget.X.Offset - (flyFrame.Position.X.Offset - dragPos.X.Offset)),
input.Position.Y - (dragTarget.Y.Offset - (flyFrame.Position.Y.Offset - dragPos.Y.Offset))
)
dragTarget = .(, dragTarget.X.Offset + delta.X, , dragTarget.Y.Offset + delta.Y)
)
flyFrame.InputEnded:(()
dragging
dragging =
TweenService:(flyFrame, TweenInfo.(, .EasingStyle.Back), {Size = .(, , , )}):()
)
RunService.Heartbeat:(updateDrag)
joyGui = .()
joyGui.ResetOnSpawn =
joyGui.Parent = playerGui
joyBase = .()
joyBase.Size = .(, , , )
joyBase.Position = .(, , , -)
joyBase.BackgroundTransparency =
joyBase.BackgroundColor3 = .(, , )
joyBase.Parent = joyGui
baseCorner = .()
baseCorner.CornerRadius = .(, )
baseCorner.Parent = joyBase
baseStroke = .()
baseStroke.Thickness =
baseStroke.Color = .(, , )
baseStroke.Transparency =
baseStroke.Parent = joyBase
joyKnob = .()
joyKnob.Size = .(, , , )
joyKnob.Position = .(, -, , -)
joyKnob.BackgroundColor3 = .(, , )
joyKnob.Parent = joyBase
knobCorner = .()
knobCorner.CornerRadius = .(, )
knobCorner.Parent = joyKnob
knobStroke = .()
knobStroke.Thickness =
knobStroke.Color = .(, , )
knobStroke.Transparency =
knobStroke.Parent = joyKnob
(()
()
TweenService:(knobStroke, TweenInfo.(, .EasingStyle.Sine, .EasingDirection.InOut, -, ), {
Transparency =
}):()
)
(dir, dist)
target = .(, dir.X * dist - , , dir.Y * dist - )
joyKnob:(target, .EasingStyle.Quad, .EasingDirection.Out, , )
JOY_ACTION =
ContextActionService:(JOY_ACTION, (_, state, input)
state == .UserInputState.Begin
state == .UserInputState.Change
center = joyBase.AbsolutePosition + joyBase.AbsoluteSize *
delta = .(input.Position.X, input.Position.Y) - center
mag = .(delta.Magnitude, JOY_RADIUS)
dir = mag > delta.Unit .()
joyInput = dir * (mag / JOY_RADIUS)
(dir, mag)
state == .UserInputState.End state == .UserInputState.Cancel
joyInput = .()
(.(), )
.ContextActionResult.Sink
, , .UserInputType.Touch)
()
center = joyBase.AbsolutePosition + joyBase.AbsoluteSize *
ContextActionService:(JOY_ACTION, .(center.X, center.Y))
ContextActionService:(JOY_ACTION, JOY_RADIUS)
joyBase:():(updateHitbox)
joyBase:():(updateHitbox)
.(updateHitbox)
RunService.Heartbeat:((dt)
joyInput.Magnitude >
f = (joyInput - joySmooth) * JOY_SPRING_K
d = -joySmooth * JOY_DAMPING
joySmooth = joySmooth + (f + d) * dt
joySmooth = joySmooth:(.(), .(, * dt))
)
udGui = .()
udGui.ResetOnSpawn =
udGui.Parent = playerGui
(pos, icon, color)
btn = .()
btn.Size = .(, , , )
btn.Position = pos
btn.BackgroundTransparency =
btn.BackgroundColor3 = .(, , )
btn.Text = icon
btn.TextColor3 = color
btn.FontFace = Font.(.Font.GothamBold)
btn.TextSize =
btn.Parent = udGui
corner = .()
corner.CornerRadius = .(, )
corner.Parent = btn
stroke = .()
stroke.Thickness =
stroke.Color = color
stroke.Transparency =
stroke.Parent = btn
btn
upBtn = (.(, -, , -), , .(, , ))
downBtn = (.(, -, , -), , .(, , ))
(btn, down)
TweenService:(btn, TweenInfo.(), {
Size = down .(, , , ) .(, , , ),
BackgroundTransparency = down
}):()
upBtn.MouseButton1Down:(() upPressed = ; (upBtn, ) )
upBtn.MouseButton1Up:(() upPressed = ; (upBtn, ) )
downBtn.MouseButton1Down:(() downPressed = ; (downBtn, ) )
downBtn.MouseButton1Up:(() downPressed = ; (downBtn, ) )
()
flying
flying =
TweenService:(flyButton, TweenInfo.(), {TextColor3 = .(, , )}):()
TweenService:(flyStroke, TweenInfo.(), {Color = .(, , )}):()
()
char = player.Character player.CharacterAdded:()
root = char:()
hum = char:()
hum.PlatformStand =
bodyGyro = .()
bodyGyro.P =
bodyGyro.MaxTorque = .(, , )
bodyGyro.CFrame = root.CFrame
bodyGyro.Parent = root
bodyVelocity = .()
bodyVelocity.MaxForce = .(, , )
bodyVelocity.Velocity = .zero
bodyVelocity.Parent = root
()
flying
flying =
TweenService:(flyButton, TweenInfo.(), {TextColor3 = .(, , )}):()
TweenService:(flyStroke, TweenInfo.(), {Color = .(, , )}):()
()
bodyGyro bodyGyro:()
bodyVelocity bodyVelocity:()
bodyGyro, bodyVelocity = ,
hum = player.Character player.Character:()
hum hum.PlatformStand =
flyButton.MouseButton1Click:(()
flying () ()
)
RunService.Heartbeat:(()
flying player.Character
root = player.Character:()
root bodyVelocity
move = .(joySmooth.X, , -joySmooth.Y)
move.Magnitude >
look = camera.CFrame.LookVector
right = camera.CFrame.RightVector
world = (look * move.Z + right * move.X) * flySpeed
bodyVelocity.Velocity = .(world.X, bodyVelocity.Velocity.Y, world.Z)
bodyVelocity.Velocity = .(, bodyVelocity.Velocity.Y, )
vert =
upPressed vert += verticalSpeed
downPressed vert -= verticalSpeed
vert == .(bodyVelocity.Velocity.Y) <
bodyVelocity.Velocity = .(bodyVelocity.Velocity.X, , bodyVelocity.Velocity.Z)
bodyVelocity.Velocity = .(bodyVelocity.Velocity.X, vert, bodyVelocity.Velocity.Z)
bodyGyro.CFrame = camera.CFrame
)
player.CharacterAdded:(()
flying .(stopFlying)
)
Players.PlayerRemoving:((p)
p == player
blur:()
)
Universal