--- RUNTIME ---


local Tool = {}

Tool.MouseButton1 = function(Character)
	if Character:GetAttribute("Cooldown") == true then return end
	Character:SetAttribute("Cooldown", true)

	Character.Humanoid:LoadAnimation(script.Animation):Play()

	Character[script.Name].Handle.Swing:Play()

	local MousePosition = MousePosition:InvokeClient(Players:GetPlayerFromCharacter(Character))
	-- Character.PrimaryPart.CFrame = CFrame.new(Character.PrimaryPart.Position, MousePosition) -- Points character at mouse, at extreme angles it trips so I'm disabling for now

	task.wait(0.33)

	Character[script.Name].Handle.Shoot:Play()
	
	Projectile(Character, MousePosition)

	task.wait(2)

	Character:SetAttribute("Cooldown", false)
end

return Tool
