-- Using GUID so no conflict occur


script.Parent.OnInvoke = function(Player, Duration)
	if not UsedGUID[Player] then
		UsedGUID[Player] = {}
		if Player.Character:FindFirstChild("Humanoid") then
			Player.Character.Humanoid.WalkSpeed = 0
			Player.Character.Humanoid.JumpHeight = 0
			Player.Character.Humanoid.JumpPower = 0
		end
	end
	local GUID = GenerateGUID(Player)
	UsedGUID[Player][GUID] = true
	task.delay(Duration, function()
		if not UsedGUID[Player] then return end
		UsedGUID[Player][GUID] = nil
		if tlength(UsedGUID[Player]) > 0 then return end
		UsedGUID[Player] = nil
		if not Player.Character or not Player.Character:FindFirstChild("Humanoid") then return end
		Player.Character.Humanoid.WalkSpeed = StarterPlayer.CharacterWalkSpeed
		if Engine:IsGrabbing(Player) then return end
		Player.Character.Humanoid.JumpHeight = StarterPlayer.CharacterJumpHeight
		Player.Character.Humanoid.JumpPower = StarterPlayer.CharacterJumpPower
	end)
end
