Universal Script 📌
4.2k Views
328 Executions

infinite jump

Universal Script 📌
mod3
mod3Published 10
1 year ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

title self explanatory, you can also hold spacebar and it'll jump automatically by itself

View Raw
-- Infinite Jump (Hold Space) for Solara
-- This works by listening to UserInput and forcing Humanoid:ChangeState to Jump

local UserInputService = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")

local holdingSpace = false

-- Detect when Space is pressed
UserInputService.InputBegan:Connect(function(input, isProcessed)
	if isProcessed then return end
	if input.KeyCode == Enum.KeyCode.Space then
		holdingSpace = true
		while holdingSpace do
			Humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
			task.wait(0.1) -- adjust speed of infinite jump
		end
	end
end)

-- Detect when Space is released
UserInputService.InputEnded:Connect(function(input)
	if input.KeyCode == Enum.KeyCode.Space then
		holdingSpace = false
	end
end)

-- Refresh Humanoid when character respawns
Player.CharacterAdded:Connect(function(newChar)
	Character = newChar
	Humanoid = Character:WaitForChild("Humanoid")
end)



Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!