--Tool.Equipped:connect(OnEquipped)
--Tool.Changed:connect(OnChanged)


Tool = script.Parent
mouse = game.Players.LocalPlayer:GetMouse()

colors = {45, 119, 21, 24, 23, 105, 104}

function fire(v)

	script.Parent.fire:FireServer(v)

end



Tool.Enabled = true
function onActivated()

	if not Tool.Enabled then
		return
	end

	Tool.Enabled = false

	local character = Tool.Parent;
	local humanoid = character.Humanoid
	if humanoid == nil then
		print("Humanoid not found")
		return 
	end

	local targetPos = humanoid.TargetPoint
	local lookAt = (mouse.Hit.p - character.Head.Position).unit

	fire(lookAt)

	wait(.5)

	Tool.Enabled = true
end


script.Parent.Activated:connect(onActivated)

