#Double Jump script

4 messages · Page 1 of 1 (latest)

fossil jasperBOT
#

studio** You are now Level 4! **studio

glacial jungle
#

Here Thais should work

fossil jasperBOT
#

studio** You are now Level 2! **studio

glacial jungle
#

local player = game:GetService("Players").LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()

local humanoidRootPart = char:WaitForChild("HumanoidRootPart")
local humanoid = char:WaitForChild("Humanoid")

local jumpUsage = 1

local uis = game:GetService("UserInputService")

uis.InputBegan:Connect(function(key, gp)
if key.KeyCode == Enum.KeyCode.Space and not gp then
if humanoidRootPart and humanoid then
if humanoid:GetState() == Enum.HumanoidStateType.Freefall then
if jumpUsage >= 1 then
jumpUsage -= 1
humanoid:ChangeState(Enum.HumanoidStateType.Jumping, true)
humanoid.StateChanged:Connect(function(old, new)
if new == Enum.HumanoidStateType.Landed then
jumpUsage = 1
end
end)
end
end
end
end
end)