ah_sce_unpacked/unpacked/Bag Playmat Customs (By BôL & Mint Tea Fan) 326dbd/Bag Dark Matter df8e34/Custom_Token DM - 4A 3d76cc.ttslua
2021-07-12 15:49:54 -04:00

28 lines
1.0 KiB
Plaintext

function onLoad()
local params = {}
params.click_function = 'updateSurface'
params.function_owner = self
params.label = 'Apply'
params.tooltip= 'Left click to apply image, right click to revert to default.'
params.position = {0,0.05,-1.6}
params.rotation = {0,0,0}
params.height = 250
params.width = 580
params.color = {0,0,0}
params.font_color = {1,1,1}
self.createButton(params)
end
function updateSurface(obj, color, alt_click)
obj_surface = getObjectFromGUID("721ba2")
local customInfo = obj_surface.getCustomObject()
if alt_click == false then
customInfo.image = "https://i.ibb.co/DfbTKHP/Dark-Matter-4-In-the-Shadow-of-Earth-Jihoo-Kim.jpg"
else
customInfo.image = "http://cloud-3.steamusercontent.com/ugc/1717534454684871624/1739012BC3EA35E381D1172705B670BEEBD1AF6F/"
end
obj_surface.setCustomObject(customInfo)
obj_surface = obj_surface.reload()
broadcastToAll("New Playmat Image Applied", {0.2,0.9,0.2})
end