Run it
Copy the script and paste it into your executor.
Players = :()
UserInputService = :()
RunService = :()
ContextActionService = :()
TweenService = :()
player = Players.LocalPlayer
camera = .CurrentCamera
CONFIG = {
DoubleJumpPower = ,
RollDuration = ,
RollDistance = ,
BaseWalkSpeed = ,
MaxWalkSpeed = ,
Acceleration = ,
BrakingDuration = ,
StopThreshold = ,
BaseFOV = ,
MaxFOV = ,
DashSpeed = ,
DashMaxTime = ,
RollAnimID = ,
RunAnimID = ,
GreenCursorID =
}
DECELERATION = CONFIG.MaxWalkSpeed / CONFIG.BrakingDuration
isMobileMode =
selectionMade =
currentCharacter =
()
existing = player:():()
existing existing:()
screenGui = .()
screenGui.Name =
screenGui.Parent = player:()
screenGui.ResetOnSpawn =
frame = .()
frame.Name =
frame.Size = .(, , , )
frame.Position = .(, , , )
frame.AnchorPoint = .(, )
frame.BackgroundColor3 = .(, , )
frame.BorderSizePixel =
frame.Parent = screenGui
uiCorner = .()
uiCorner.CornerRadius = .(, )
uiCorner.Parent = frame
header = .()
header.Text =
header.Size = .(, , , )
header.BackgroundTransparency =
header.TextColor3 = .(, , )
header.Font = .Font.FredokaOne
header.TextSize =
header.Parent = frame
desc = .()
desc.Text =
desc.Size = .(, -, , )
desc.Position = .(, , , )
desc.BackgroundTransparency =
desc.TextColor3 = .(, , )
desc.Font = .Font.GothamMedium
desc.TextSize =
desc.TextXAlignment = .TextXAlignment.Left
desc.TextYAlignment = .TextYAlignment.Top
desc.TextWrapped =
desc.Parent = frame
btnPC = .()
btnPC.Name =
btnPC.Text =
btnPC.Size = .(, , , )
btnPC.Position = .(, , , -)
btnPC.BackgroundColor3 = .(, , )
btnPC.TextColor3 = .(, , )
btnPC.Font = .Font.GothamBold
btnPC.TextSize =
btnPC.Parent = frame
btnCorner1 = .()
btnCorner1.CornerRadius = .(, )
btnCorner1.Parent = btnPC
btnMobile = .()
btnMobile.Name =
btnMobile.Text =
btnMobile.Size = .(, , , )
btnMobile.Position = .(, , , -)
btnMobile.BackgroundColor3 = .(, , )
btnMobile.TextColor3 = .(, , )
btnMobile.Font = .Font.GothamBold
btnMobile.TextSize =
btnMobile.Parent = frame
btnCorner2 = .()
btnCorner2.CornerRadius = .(, )
btnCorner2.Parent = btnMobile
()
screenGui:()
btnPC.MouseButton1Click:(()
isMobileMode =
selectionMade =
()
)
btnMobile.MouseButton1Click:(()
isMobileMode =
selectionMade =
()
)
(character)
currentCharacter = character
humanoid = character:()
rootPart = character:()
animator = humanoid:()
humanoid.WalkSpeed = CONFIG.BaseWalkSpeed
currentSpeed = CONFIG.BaseWalkSpeed
lastMoveDirection = .(, , -)
runAnim = .()
runAnim.AnimationId = CONFIG.RunAnimID
runTrack = animator:(runAnim)
runTrack.Priority = .AnimationPriority.Movement
runTrack.Looped =
rollAnim = .()
rollAnim.AnimationId = CONFIG.RollAnimID
rollTrack = animator:(rollAnim)
rollTrack.Priority = .AnimationPriority.Action
rollTrack.Looped =
jumpAnim = .()
jumpAnim.AnimationId = CONFIG.RollAnimID
jumpTrack = animator:(jumpAnim)
jumpTrack.Priority = .AnimationPriority.Action
jumpTrack.Looped =
tool = .()
tool.Name =
tool.RequiresHandle =
tool.CanBeDropped =
tool.Parent = player.Backpack
mouse = player:()
tool.Equipped:(() mouse.Icon = CONFIG.GreenCursorID )
tool.Unequipped:(() mouse.Icon = )
tool.Activated:(()
state = humanoid:()
isInAir = (state == .HumanoidStateType.Freefall state == .HumanoidStateType.Jumping)
isInAir
targetPos = mouse.Hit.Position
startPos = rootPart.Position
direction = (targetPos - startPos).Unit
distance = (targetPos - startPos).Magnitude
duration = .(distance / CONFIG.DashSpeed, CONFIG.DashMaxTime)
rollTrack:()
bv = .()
bv.Velocity = direction * CONFIG.DashSpeed
bv.MaxForce = .(, , )
bv.P =
bv.Parent = rootPart
bg = .()
bg.CFrame = .(startPos, targetPos)
bg.MaxTorque = .(, , )
bg.P =
bg.Parent = rootPart
.(duration, ()
bv bv:()
bg bg:()
rollTrack:()
rootPart.AssemblyLinearVelocity = .zero
)
)
hasDoubleJumped =
canTriggerDoubleJump =
humanoid.StateChanged:((oldState, newState)
newState == .HumanoidStateType.Landed
hasDoubleJumped =
canTriggerDoubleJump =
newState == .HumanoidStateType.Jumping
canTriggerDoubleJump =
.()
canTriggerDoubleJump =
newState == .HumanoidStateType.Freefall
oldState == .HumanoidStateType.Landed
canTriggerDoubleJump =
)
UserInputService.JumpRequest:(()
state = humanoid:()
isInAir = (state == .HumanoidStateType.Freefall state == .HumanoidStateType.Jumping)
canTriggerDoubleJump hasDoubleJumped isInAir
hasDoubleJumped =
rootPart.AssemblyLinearVelocity = .(rootPart.AssemblyLinearVelocity.X, CONFIG.DoubleJumpPower, rootPart.AssemblyLinearVelocity.Z)
jumpTrack:()
jumpTrack:()
humanoid:(.HumanoidStateType.Jumping)
)
rolling =
holdingRollKey =
()
rolling =
rollTrack:()
()
direction = rootPart.CFrame.LookVector
startPos = rootPart.Position
targetPos = startPos + (direction * CONFIG.RollDistance)
startTime = ()
connection
connection = RunService.RenderStepped:(()
elapsed = () - startTime
elapsed > CONFIG.RollDuration
connection:()
holdingRollKey () ()
rayParams = RaycastParams.()
rayParams.FilterDescendantsInstances = {character}
rayParams.FilterType = .RaycastFilterType.Exclude
rayResult = :(rootPart.Position, direction * , rayParams)
rayResult rayResult.Instance.CanCollide
connection:()
()
alpha = elapsed / CONFIG.RollDuration
nextPos = startPos:(targetPos, alpha)
rootPart.CFrame = .(nextPos, nextPos + direction)
)
()
rolling
rolling =
rollTrack:()
()
(actionName, inputState)
inputState == .UserInputState.Begin
holdingRollKey =
()
inputState == .UserInputState.End
holdingRollKey =
()
ContextActionService:()
ContextActionService:(, handleRollInput, isMobileMode, .KeyCode.R)
isMobileMode
ContextActionService:(, )
ContextActionService:(, .(, , , ))
.(()
selectionMade
.()
()
)
selectionMade
()
()
moveVector = .(, , )
UserInputService:(.KeyCode.W) moveVector = moveVector + .(,,-)
UserInputService:(.KeyCode.S) moveVector = moveVector + .(,,)
UserInputService:(.KeyCode.A) moveVector = moveVector + .(-,,)
UserInputService:(.KeyCode.D) moveVector = moveVector + .(,,)
success, module = (() (player.PlayerScripts.PlayerModule) )
success module
controls = module:()
controls
touchMove = controls:()
touchMove.Magnitude > moveVector = touchMove
moveVector
RunService.RenderStepped:((dt)
inputVector = ()
isInputting = inputVector.Magnitude >
isInputting
rootPart.AssemblyLinearVelocity.Magnitude >
lastMoveDirection = .(rootPart.AssemblyLinearVelocity.X, , rootPart.AssemblyLinearVelocity.Z).Unit
lastMoveDirection = rootPart.CFrame.LookVector
currentSpeed = .(currentSpeed + (CONFIG.Acceleration * dt), CONFIG.MaxWalkSpeed)
humanoid.WalkSpeed = currentSpeed
currentSpeed > CONFIG.BaseWalkSpeed
currentSpeed = .(currentSpeed - (DECELERATION * dt), CONFIG.BaseWalkSpeed)
humanoid.WalkSpeed = currentSpeed
humanoid:(lastMoveDirection, )
currentSpeed = CONFIG.BaseWalkSpeed
humanoid.WalkSpeed = CONFIG.BaseWalkSpeed
velocityMag = .(rootPart.AssemblyLinearVelocity.X, , rootPart.AssemblyLinearVelocity.Z).Magnitude
intensity = .((velocityMag - CONFIG.BaseWalkSpeed) / (CONFIG.MaxWalkSpeed - CONFIG.BaseWalkSpeed), , )
targetFOV = CONFIG.BaseFOV + (intensity * (CONFIG.MaxFOV - CONFIG.BaseFOV))
camera.FieldOfView = camera.FieldOfView + (targetFOV - camera.FieldOfView) * .(dt * , , )
velocityMag >
runTrack.IsPlaying runTrack:()
runTrack:( + (intensity * ))
runTrack.IsPlaying runTrack:()
)
()
player.Character
(player.Character)
player.CharacterAdded:(onCharacterAdded)