--flail
--codename: the holy nutsack

function init()	
	motor = FindJoint("motor")
	
	trig = FindTrigger("activate")
end

function tick(dt)
	local active = IsPointInTrigger(trig, GetPlayerTransform().pos)
	
	if not active then
		SetJointMotor(motor, 0)
	else
		SetJointMotor(motor, 30)
	end
	
	--DebugPrint(active)
end