BLOXBUILDS
Discord
Back
OBBY

Speed / Jump Pad

Paste as a Script inside a pad. Stepping on it raises walk speed and jump height, then restores both after a few seconds.

-- Paste as a Script inside a speed or jump pad.

local SPEED = 28
local EXTRA_JUMP = 12
local DURATION = 2

local part = script.Parent
if not part or not part:IsA("BasePart") then
	return
end

local boosted: { [Humanoid]: boolean } = {}

part.Touched:Connect(function(hit)
	local humanoid = hit.Parent and hit.Parent:FindFirstChildOfClass("Humanoid")
	if not humanoid or boosted[humanoid] then
		return
	end

	boosted[humanoid] = true
	local oldSpeed = humanoid.WalkSpeed
	local oldJumpPower = humanoid.JumpPower
	local oldJumpHeight = humanoid.JumpHeight

	humanoid.WalkSpeed = SPEED
	if humanoid.UseJumpPower then
		humanoid.JumpPower += EXTRA_JUMP
	else
		humanoid.JumpHeight += EXTRA_JUMP
	end

	task.delay(DURATION, function()
		if humanoid.Parent then
			humanoid.WalkSpeed = oldSpeed
			humanoid.JumpPower = oldJumpPower
			humanoid.JumpHeight = oldJumpHeight
		end
		boosted[humanoid] = nil
	end)
end)