-- Connect events

Humanoid.Died:Connect(onDied)
Humanoid.Running:Connect(onRunning)
Humanoid.Jumping:Connect(onJumping)
Humanoid.Climbing:Connect(onClimbing)
Humanoid.GettingUp:Connect(onGettingUp)
Humanoid.FreeFalling:Connect(onFreeFall)
Humanoid.FallingDown:Connect(onFallingDown)
Humanoid.Seated:Connect(onSeated)
Humanoid.PlatformStanding:Connect(onPlatformStanding)
Humanoid.Swimming:Connect(onSwimming)

local a, r = false, game:GetService("RunService").RenderStepped
UserInputService.InputBegan:Connect(function(input, gameProcessedEvent)
	if (not gameProcessedEvent) then
		if (input.KeyCode == Enum.KeyCode.Space) then
			a = true
		end
	end
end)
UserInputService.InputEnded:Connect(function(input, gameProcessedEvent)
	if (not gameProcessedEvent) then
		if (input.KeyCode == Enum.KeyCode.Space) then
			a = false
		end
	end
end)
r:Connect(function()
	if (a) then
		Humanoid.Jump = true
	end
end)
