--[[ http://coffeescript.org/ ]]
 --
local coffee = script.Parent;
local drinking = false

coffee.Equipped:connect(function()
	coffee.Handle.OpenSound:Play()
end)

coffee.Activated:connect(function()
	if drinking then
		return
	end

	drinking = true
	coffee.GripForward = Vector3.new(0,-.759,-.651)
	coffee.GripPos = Vector3.new(1.5,-.5,.3)
	coffee.GripRight = Vector3.new(1,0,0)
	coffee.GripUp = Vector3.new(0,.651,-.759)

	coffee.Handle.DrinkSound:Play()

	wait(2)
	
	coffee.Parent.Humanoid.Health = coffee.Parent.Humanoid.Health + 100
	restPos()

	drinking = false
end)

coffee.Unequipped:connect(function()
	restPos()
	coffee.Handle.DrinkSound:Stop()
	drinking = false
end)

function restPos()
	coffee.GripForward = Vector3.new(-.976,0,-0.217)
	coffee.GripPos = Vector3.new(0.03,0,0)
	coffee.GripRight = Vector3.new(.217,0,-.976)
	coffee.GripUp = Vector3.new(0,1,0)
end
