Untitled

                Never    
Lua
       
```lua
OBJ_NAME = "[1CE055]Tier 3[-] [FF00EC]Printer[-]"
PRINT_OBJECT_GUID = "8472bf"

PRINT_TIME = 900
TIMER_IDENTIFIER = nil

timeToNextPrint = PRINT_TIME
printedObject = false

active = false

function ToggleBool(obj, col)

	self.setDescription( self.getDescription()=="Locked" and "Unlocked" or "Locked"  )

	self.editButton( {index=0, label=self.getDescription()} )
	if self.getDescription()=="Locked" then
		self.lock() else self.unlock()
	end


end


function onLoad()

	self.createButton({
		label=self.getDescription(), click_function="ToggleBool", function_owner=self,
		position={0,1,0}, rotation={0,0,0}, width=500, height=250, font_size=100
	})


	if OBJ_NAME == nil then
		OBJ_NAME = self.getName()
	else
		self.setName(OBJ_NAME)
	end

end

function onPickedUp(plyColor)

	if not active and plyColor ~= "Black" then

		activateTimer()
		active = true

	end

end

function activateTimer()

	local timerIdentifier = "Timer." .. math.random(1,10000)
	local timerFunction = "timerFire"
	local timerPassParams = {""}
	local timerDelay = 1
	local timerReps = 0

	local timerParams = {}
	timerParams.identifier = timerIdentifier
	timerParams.function_name = timerFunction
	timerParams.parameters = timerPassParams
	timerParams.delay = timerDelay
	timerParams.repetitions = timerReps
	Timer.create(timerParams)

	TIMER_IDENTIFIER = timerIdentifier

end

function onDestroy()

	if TIMER_IDENTIFIER then
		Timer.destroy(TIMER_IDENTIFIER)
	end

end

function printObject(objGUID)

	local objToClone = getObjectFromGUID(objGUID)

	local pos = self.getPosition()
	local yOffset = 1

	local cloneParams = {}
	cloneParams.position = {pos.x, pos.y + yOffset, pos.z}

	local clonedObj = objToClone.clone(cloneParams)
	clonedObj.unlock()

end

function timerFire()

	timeToNextPrint = timeToNextPrint - 1

	if timeToNextPrint <= 0 then

		printObject(PRINT_OBJECT_GUID)
		timeToNextPrint = PRINT_TIME

	end

	local timeLeft = string.format("%02d:%02d",  timeToNextPrint / 60 % 60, timeToNextPrint % 60)

	self.setName(OBJ_NAME ..  " (Next Print: " .. timeLeft .. ")")

end```

Raw Text