local A=game:GetService("\085\115\101\114\073\110\112\117\116\083\101\114\118\105\099\101")local L=game.Players.LocalPlayer local D local T local h=false local R=false local E TIME_BETWEEN_JUMPS=.1 local S=1.5 function onJumpRequest()if not D or not T or not D:IsDescendantOf(workspace)or T:GetState()==Enum.HumanoidStateType.Dead then return end if h and not R then R=true T.JumpPower=oldPower*S T:ChangeState(Enum.HumanoidStateType.Jumping)end end local function U(A)D=A T=A:WaitForChild("\072\117\109\097\110\111\105\100")R=false h=false oldPower=T.JumpPower T.StateChanged:connect(function(A,L)if L==Enum.HumanoidStateType.Landed then h=false R=false T.JumpPower=oldPower elseif L==Enum.HumanoidStateType.Freefall then wait(TIME_BETWEEN_JUMPS)h=true end end)end if L.Character then U(L.Character)end L.CharacterAdded:connect(U)A.JumpRequest:connect(onJumpRequest)


local UserInputService = game:GetService("UserInputService")
local localPlayer = game.Players.LocalPlayer
local character
local humanoid
 
local canDoubleJump = false
local hasDoubleJumped = false
local oldPowerlocal TIME_BETWEEN_JUMPS = 0.1
local DOUBLE_JUMP_POWER_MULTIPLIER = 1.5

function onJumpRequest()
	if not character or not humanoid or not character:IsDescendantOf(workspace) or
	 humanoid:GetState() == Enum.HumanoidStateType.Dead then
		return
	end
 
	if canDoubleJump and not hasDoubleJumped then
		hasDoubleJumped = true
		humanoid.JumpPower = oldPower * DOUBLE_JUMP_POWER_MULTIPLIER		humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
	end
end
 
local function characterAdded(newCharacter)
	character = newCharacter
	humanoid = newCharacter:WaitForChild("Humanoid")
	hasDoubleJumped = false
	canDoubleJump = false
	oldPower = humanoid.JumpPower 
	humanoid.StateChanged:connect(function(old, new)
		if new == Enum.HumanoidStateType.Landed then
			canDoubleJump = false
			hasDoubleJumped = false
			humanoid.JumpPower = oldPower		elseif new == Enum.HumanoidStateType.Freefall then
			wait(TIME_BETWEEN_JUMPS)			canDoubleJump = true
		end
	end)
end
 
if localPlayer.Character then
	characterAdded(localPlayer.Character)
end
 
localPlayer.CharacterAdded:connect(characterAdded)
UserInputService.JumpRequest:connect(onJumpRequest)
