--//VIPERGUTZ
--//TASER ANIMATIONS


local Tool = script.Parent
local IdleAnimation
local IdleTrack = nil

IdleAnimation = Tool:WaitForChild("Idle")

script.Parent.Equipped:Connect(function(mouse)
	local MyCharacter = Tool.Parent
	local MyPlayer = game:GetService('Players'):GetPlayerFromCharacter(MyCharacter)
	local MyHumanoid = MyCharacter:FindFirstChild('Humanoid')
	
	if IdleAnimation then
		IdleTrack = MyHumanoid:LoadAnimation(IdleAnimation)
		IdleTrack.Priority = Enum.AnimationPriority.Movement
	end
	if IdleTrack then
		IdleTrack:Play()
	end
end)

script.Parent.Unequipped:Connect(function(mouse)
	if IdleTrack then
		IdleTrack:Stop()
	end
end)
