--========================================================
-- MOVEMENT SYSTEM + KEYBIND UI
--
-- F = ENABLE WALLHOP
-- E = DISABLE WALLHOP
-- SPACE = WALLHOP
-- C = SLIDE
-- Q = INFINITE AIR JUMP
--
-- LocalScript
-- Put inside:
-- StarterPlayer > StarterPlayerScripts
--========================================================
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
--========================================================
-- WALLHOP SETTINGS
--========================================================
local wallHopEnabled = false
local WALL_DISTANCE = 3.5
local WALL_JUMP_POWER = 55
local WALL_PUSH = 14
local WALL_JUMP_COOLDOWN = 0.10
local FLIP_ANGLE = 70
local FLIP_TIME = 0.10
--========================================================
-- SLIDE SETTINGS
--========================================================
local SLIDE_SPEED = 65
local SLIDE_DURATION = 1.0
local SLIDE_COOLDOWN = 0.8
local lastSlide = 0
local sliding = false
--========================================================
-- INFINITE AIR JUMP SETTINGS
--========================================================
local INFINITE_JUMP_POWER = 55
--========================================================
-- CHARACTER
--========================================================
local character
local humanoid
local root
local lastWallJump = 0
local currentTilt = 0
local tiltConnection
local rayParams = RaycastParams.new()
rayParams.FilterType = Enum.RaycastFilterType.Exclude
local function setupCharacter(char)
character = char
humanoid = char:WaitForChild("Humanoid")
root = char:WaitForChild("HumanoidRootPart")
rayParams.FilterDescendantsInstances = {
character
}
lastWallJump = 0
lastSlide = 0
sliding = false
currentTilt = 0
end
setupCharacter(
player.Character or player.CharacterAdded:Wait()
)
player.CharacterAdded:Connect(function(char)
setupCharacter(char)
end)
--========================================================
-- KEYBIND UI
--========================================================
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "MovementKeybinds"
screenGui.ResetOnSpawn = false
screenGui.IgnoreGuiInset = true
screenGui.Parent = player:WaitForChild("PlayerGui")
local keybindLabel = Instance.new("TextLabel")
keybindLabel.Name = "Keybinds"
keybindLabel.Parent = screenGui
-- Bottom-left position
keybindLabel.AnchorPoint = Vector2.new(0, 1)
keybindLabel.Position = UDim2.new(
0,
18,
1,
-18
)
keybindLabel.Size = UDim2.new(
0,
260,
0,
130
)
keybindLabel.BackgroundTransparency = 1
-- White text
keybindLabel.TextColor3 = Color3.fromRGB(
255,
255,
255
)
keybindLabel.TextSize = 18
keybindLabel.Font = Enum.Font.GothamMedium
keybindLabel.TextXAlignment =
Enum.TextXAlignment.Left
keybindLabel.TextYAlignment =
Enum.TextYAlignment.Bottom
keybindLabel.TextWrapped = true
keybindLabel.Text =
"F - Enable Wallhop\n" ..
"E - Disable Wallhop\n" ..
"SPACE - Wallhop\n" ..
"C - Slide\n" ..
"Q - Infinite Jump"
--========================================================
-- WALL DETECTION
--========================================================
local function getWall()
if not character or not root then
return nil
end
rayParams.FilterDescendantsInstances = {
character
}
local origin = root.Position
local directions = {
root.CFrame.LookVector,
-root.CFrame.LookVector,
root.CFrame.RightVector,
-root.CFrame.RightVector,
(root.CFrame.LookVector +
root.CFrame.RightVector).Unit,
(root.CFrame.LookVector -
root.CFrame.RightVector).Unit,
(-root.CFrame.LookVector +
root.CFrame.RightVector).Unit,
(-root.CFrame.LookVector -
root.CFrame.RightVector).Unit
}
for _, direction in ipairs(directions) do
local result = workspace:Raycast(
origin,
direction * WALL_DISTANCE,
rayParams
)
if result then
if math.abs(result.Normal.Y) < 0.5 then
return result
end
end
end
return nil
end
--========================================================
-- BODY FLICK
--========================================================
local function doBodyTilt()
if not root then
return
end
if tiltConnection then
tiltConnection:Disconnect()
tiltConnection = nil
end
currentTilt = 0
local startTime = os.clock()
tiltConnection =
RunService.RenderStepped:Connect(function()
if not root or not root.Parent then
if tiltConnection then
tiltConnection:Disconnect()
tiltConnection = nil
end
return
end
local elapsed =
os.clock() - startTime
if elapsed < FLIP_TIME then
local alpha =
elapsed / FLIP_TIME
alpha =
alpha * alpha *
(3 - 2 * alpha)
currentTilt =
math.rad(FLIP_ANGLE) * alpha
else
local returnAlpha =
math.clamp(
(elapsed - FLIP_TIME) /
FLIP_TIME,
0,
1
)
returnAlpha =
returnAlpha * returnAlpha *
(3 - 2 * returnAlpha)
currentTilt =
math.rad(FLIP_ANGLE) *
(1 - returnAlpha)
if returnAlpha >= 1 then
currentTilt = 0
tiltConnection:Disconnect()
tiltConnection = nil
return
end
end
root.CFrame =
root.CFrame *
CFrame.Angles(
currentTilt,
0,
0
)
end)
end
--========================================================
-- WALL JUMP
--========================================================
local function wallJump()
if not wallHopEnabled then
return
end
if not humanoid or not root then
return
end
if humanoid.Health <= 0 then
return
end
if os.clock() - lastWallJump <
WALL_JUMP_COOLDOWN then
return
end
local wall = getWall()
if not wall then
return
end
lastWallJump = os.clock()
local normal = wall.Normal
humanoid:ChangeState(
Enum.HumanoidStateType.Jumping
)
root.AssemblyLinearVelocity =
Vector3.new(
normal.X * WALL_PUSH,
WALL_JUMP_POWER,
normal.Z * WALL_PUSH
)
doBodyTilt()
end
--========================================================
-- SLIDE
--========================================================
local function slide()
if not character or not humanoid or not root then
return
end
if humanoid.Health <= 0 then
return
end
if os.clock() - lastSlide <
SLIDE_COOLDOWN then
return
end
if humanoid.FloorMaterial ==
Enum.Material.Air then
return
end
local moveDirection =
humanoid.MoveDirection
if moveDirection.Magnitude < 0.1 then
return
end
lastSlide = os.clock()
sliding = true
local oldAutoRotate =
humanoid.AutoRotate
humanoid.AutoRotate = false
local startTime = os.clock()
while os.clock() - startTime <
SLIDE_DURATION do
if not character or
not humanoid or
not root then
break
end
if humanoid.FloorMaterial ==
Enum.Material.Air then
break
end
local elapsed =
os.clock() - startTime
local alpha =
math.clamp(
elapsed / SLIDE_DURATION,
0,
1
)
local smooth =
1 - (alpha * alpha)
local speed =
SLIDE_SPEED * smooth
root.AssemblyLinearVelocity =
Vector3.new(
moveDirection.X * speed,
root.AssemblyLinearVelocity.Y,
moveDirection.Z * speed
)
RunService.RenderStepped:Wait()
end
if humanoid and humanoid.Parent then
humanoid.AutoRotate = oldAutoRotate
end
sliding = false
end
--========================================================
-- INFINITE AIR JUMP
--========================================================
local function infiniteJump()
if not character or
not humanoid or
not root then
return
end
if humanoid.Health <= 0 then
return
end
if humanoid.FloorMaterial ~=
Enum.Material.Air then
return
end
local velocity =
root.AssemblyLinearVelocity
root.AssemblyLinearVelocity =
Vector3.new(
velocity.X,
INFINITE_JUMP_POWER,
velocity.Z
)
humanoid:ChangeState(
Enum.HumanoidStateType.Jumping
)
end
--========================================================
-- INPUT
--========================================================
UserInputService.InputBegan:Connect(function(
input,
gameProcessed
)
if gameProcessed then
return
end
-- F = ENABLE WALLHOP
if input.KeyCode == Enum.KeyCode.F then
wallHopEnabled = true
print("WALLHOP ENABLED")
return
end
-- E = DISABLE WALLHOP
if input.KeyCode == Enum.KeyCode.E then
wallHopEnabled = false
print("WALLHOP DISABLED")
return
end
-- SPACE = WALLHOP
if input.KeyCode == Enum.KeyCode.Space then
if wallHopEnabled then
wallJump()
end
return
end
-- C = SLIDE
if input.KeyCode == Enum.KeyCode.C then
if not sliding then
task.spawn(slide)
end
return
end
-- Q = INFINITE AIR JUMP
if input.KeyCode == Enum.KeyCode.Q then
infiniteJump()
return
end
end)Features are at bottom left of screen
[PC ONLY BTW]
1--========================================================
2-- MOVEMENT SYSTEM + KEYBIND UI
3--
4-- F = ENABLE WALLHOP
5-- E = DISABLE WALLHOP
6-- SPACE = WALLHOP
7-- C = SLIDE
8-- Q = INFINITE AIR JUMP
9--
10-- LocalScript
11-- Put inside:
12-- StarterPlayer > StarterPlayerScripts
13--========================================================
14
15local Players = game:GetService("Players")
16local UserInputService = game:GetService("UserInputService")
17local RunService = game:GetService("RunService")
18
19local player = Players.LocalPlayer
20
21--========================================================
22-- WALLHOP SETTINGS
23--========================================================
24
25local wallHopEnabled = false
26
27local WALL_DISTANCE = 3.5
28local WALL_JUMP_POWER = 55
29local WALL_PUSH = 14
30local WALL_JUMP_COOLDOWN = 0.10
31
32local FLIP_ANGLE = 70
33local FLIP_TIME = 0.10
34
35--========================================================
36-- SLIDE SETTINGS
37--========================================================
38
39local SLIDE_SPEED = 65
40local SLIDE_DURATION = 1.0
41local SLIDE_COOLDOWN = 0.8
42
43local lastSlide = 0
44local sliding = false
45
46--========================================================
47-- INFINITE AIR JUMP SETTINGS
48--========================================================
49
50local INFINITE_JUMP_POWER = 55
51
52--========================================================
53-- CHARACTER
54--========================================================
55
56local character
57local humanoid
58local root
59
60local lastWallJump = 0
61
62local currentTilt = 0
63local tiltConnection
64
65local rayParams = RaycastParams.new()
66rayParams.FilterType = Enum.RaycastFilterType.Exclude
67
68local function setupCharacter(char)
69
70 character = char
71
72 humanoid = char:WaitForChild("Humanoid")
73 root = char:WaitForChild("HumanoidRootPart")
74
75 rayParams.FilterDescendantsInstances = {
76 character
77 }
78
79 lastWallJump = 0
80 lastSlide = 0
81 sliding = false
82 currentTilt = 0
83
84end
85
86setupCharacter(
87 player.Character or player.CharacterAdded:Wait()
88)
89
90player.CharacterAdded:Connect(function(char)
91 setupCharacter(char)
92end)
93
94--========================================================
95-- KEYBIND UI
96--========================================================
97
98local screenGui = Instance.new("ScreenGui")
99screenGui.Name = "MovementKeybinds"
100screenGui.ResetOnSpawn = false
101screenGui.IgnoreGuiInset = true
102screenGui.Parent = player:WaitForChild("PlayerGui")
103
104local keybindLabel = Instance.new("TextLabel")
105keybindLabel.Name = "Keybinds"
106keybindLabel.Parent = screenGui
107
108-- Bottom-left position
109keybindLabel.AnchorPoint = Vector2.new(0, 1)
110keybindLabel.Position = UDim2.new(
111 0,
112 18,
113 1,
114 -18
115)
116
117keybindLabel.Size = UDim2.new(
118 0,
119 260,
120 0,
121 130
122)
123
124keybindLabel.BackgroundTransparency = 1
125
126-- White text
127keybindLabel.TextColor3 = Color3.fromRGB(
128 255,
129 255,
130 255
131)
132
133keybindLabel.TextSize = 18
134keybindLabel.Font = Enum.Font.GothamMedium
135
136keybindLabel.TextXAlignment =
137 Enum.TextXAlignment.Left
138
139keybindLabel.TextYAlignment =
140 Enum.TextYAlignment.Bottom
141
142keybindLabel.TextWrapped = true
143
144keybindLabel.Text =
145 "F - Enable Wallhop\n" ..
146 "E - Disable Wallhop\n" ..
147 "SPACE - Wallhop\n" ..
148 "C - Slide\n" ..
149 "Q - Infinite Jump"
150
151--========================================================
152-- WALL DETECTION
153--========================================================
154
155local function getWall()
156
157 if not character or not root then
158 return nil
159 end
160
161 rayParams.FilterDescendantsInstances = {
162 character
163 }
164
165 local origin = root.Position
166
167 local directions = {
168
169 root.CFrame.LookVector,
170 -root.CFrame.LookVector,
171
172 root.CFrame.RightVector,
173 -root.CFrame.RightVector,
174
175 (root.CFrame.LookVector +
176 root.CFrame.RightVector).Unit,
177
178 (root.CFrame.LookVector -
179 root.CFrame.RightVector).Unit,
180
181 (-root.CFrame.LookVector +
182 root.CFrame.RightVector).Unit,
183
184 (-root.CFrame.LookVector -
185 root.CFrame.RightVector).Unit
186 }
187
188 for _, direction in ipairs(directions) do
189
190 local result = workspace:Raycast(
191 origin,
192 direction * WALL_DISTANCE,
193 rayParams
194 )
195
196 if result then
197
198 if math.abs(result.Normal.Y) < 0.5 then
199 return result
200 end
201
202 end
203
204 end
205
206 return nil
207end
208
209--========================================================
210-- BODY FLICK
211--========================================================
212
213local function doBodyTilt()
214
215 if not root then
216 return
217 end
218
219 if tiltConnection then
220 tiltConnection:Disconnect()
221 tiltConnection = nil
222 end
223
224 currentTilt = 0
225
226 local startTime = os.clock()
227
228 tiltConnection =
229 RunService.RenderStepped:Connect(function()
230
231 if not root or not root.Parent then
232
233 if tiltConnection then
234 tiltConnection:Disconnect()
235 tiltConnection = nil
236 end
237
238 return
239 end
240
241 local elapsed =
242 os.clock() - startTime
243
244 if elapsed < FLIP_TIME then
245
246 local alpha =
247 elapsed / FLIP_TIME
248
249 alpha =
250 alpha * alpha *
251 (3 - 2 * alpha)
252
253 currentTilt =
254 math.rad(FLIP_ANGLE) * alpha
255
256 else
257
258 local returnAlpha =
259 math.clamp(
260 (elapsed - FLIP_TIME) /
261 FLIP_TIME,
262 0,
263 1
264 )
265
266 returnAlpha =
267 returnAlpha * returnAlpha *
268 (3 - 2 * returnAlpha)
269
270 currentTilt =
271 math.rad(FLIP_ANGLE) *
272 (1 - returnAlpha)
273
274 if returnAlpha >= 1 then
275
276 currentTilt = 0
277
278 tiltConnection:Disconnect()
279 tiltConnection = nil
280
281 return
282 end
283
284 end
285
286 root.CFrame =
287 root.CFrame *
288 CFrame.Angles(
289 currentTilt,
290 0,
291 0
292 )
293
294 end)
295end
296
297--========================================================
298-- WALL JUMP
299--========================================================
300
301local function wallJump()
302
303 if not wallHopEnabled then
304 return
305 end
306
307 if not humanoid or not root then
308 return
309 end
310
311 if humanoid.Health <= 0 then
312 return
313 end
314
315 if os.clock() - lastWallJump <
316 WALL_JUMP_COOLDOWN then
317 return
318 end
319
320 local wall = getWall()
321
322 if not wall then
323 return
324 end
325
326 lastWallJump = os.clock()
327
328 local normal = wall.Normal
329
330 humanoid:ChangeState(
331 Enum.HumanoidStateType.Jumping
332 )
333
334 root.AssemblyLinearVelocity =
335 Vector3.new(
336 normal.X * WALL_PUSH,
337 WALL_JUMP_POWER,
338 normal.Z * WALL_PUSH
339 )
340
341 doBodyTilt()
342
343end
344
345--========================================================
346-- SLIDE
347--========================================================
348
349local function slide()
350
351 if not character or not humanoid or not root then
352 return
353 end
354
355 if humanoid.Health <= 0 then
356 return
357 end
358
359 if os.clock() - lastSlide <
360 SLIDE_COOLDOWN then
361 return
362 end
363
364 if humanoid.FloorMaterial ==
365 Enum.Material.Air then
366 return
367 end
368
369 local moveDirection =
370 humanoid.MoveDirection
371
372 if moveDirection.Magnitude < 0.1 then
373 return
374 end
375
376 lastSlide = os.clock()
377 sliding = true
378
379 local oldAutoRotate =
380 humanoid.AutoRotate
381
382 humanoid.AutoRotate = false
383
384 local startTime = os.clock()
385
386 while os.clock() - startTime <
387 SLIDE_DURATION do
388
389 if not character or
390 not humanoid or
391 not root then
392 break
393 end
394
395 if humanoid.FloorMaterial ==
396 Enum.Material.Air then
397 break
398 end
399
400 local elapsed =
401 os.clock() - startTime
402
403 local alpha =
404 math.clamp(
405 elapsed / SLIDE_DURATION,
406 0,
407 1
408 )
409
410 local smooth =
411 1 - (alpha * alpha)
412
413 local speed =
414 SLIDE_SPEED * smooth
415
416 root.AssemblyLinearVelocity =
417 Vector3.new(
418 moveDirection.X * speed,
419 root.AssemblyLinearVelocity.Y,
420 moveDirection.Z * speed
421 )
422
423 RunService.RenderStepped:Wait()
424
425 end
426
427 if humanoid and humanoid.Parent then
428 humanoid.AutoRotate = oldAutoRotate
429 end
430
431 sliding = false
432
433end
434
435--========================================================
436-- INFINITE AIR JUMP
437--========================================================
438
439local function infiniteJump()
440
441 if not character or
442 not humanoid or
443 not root then
444 return
445 end
446
447 if humanoid.Health <= 0 then
448 return
449 end
450
451 if humanoid.FloorMaterial ~=
452 Enum.Material.Air then
453 return
454 end
455
456 local velocity =
457 root.AssemblyLinearVelocity
458
459 root.AssemblyLinearVelocity =
460 Vector3.new(
461 velocity.X,
462 INFINITE_JUMP_POWER,
463 velocity.Z
464 )
465
466 humanoid:ChangeState(
467 Enum.HumanoidStateType.Jumping
468 )
469
470end
471
472--========================================================
473-- INPUT
474--========================================================
475
476UserInputService.InputBegan:Connect(function(
477 input,
478 gameProcessed
479)
480
481 if gameProcessed then
482 return
483 end
484
485 -- F = ENABLE WALLHOP
486 if input.KeyCode == Enum.KeyCode.F then
487
488 wallHopEnabled = true
489
490 print("WALLHOP ENABLED")
491
492 return
493 end
494
495 -- E = DISABLE WALLHOP
496 if input.KeyCode == Enum.KeyCode.E then
497
498 wallHopEnabled = false
499
500 print("WALLHOP DISABLED")
501
502 return
503 end
504
505 -- SPACE = WALLHOP
506 if input.KeyCode == Enum.KeyCode.Space then
507
508 if wallHopEnabled then
509 wallJump()
510 end
511
512 return
513 end
514
515 -- C = SLIDE
516 if input.KeyCode == Enum.KeyCode.C then
517
518 if not sliding then
519 task.spawn(slide)
520 end
521
522 return
523 end
524
525 -- Q = INFINITE AIR JUMP
526 if input.KeyCode == Enum.KeyCode.Q then
527
528 infiniteJump()
529
530 return
531 end
532
533end)