Skip to content

Instantly share code, notes, and snippets.

@RobMayer
RobMayer / AutoUpdater.lua
Last active May 2, 2019 16:50
[TTS] Auto-Update utility
ScriptVersion = 4
ScriptClass = 'MyUtility'
function checkForUpdate()
WebRequest.get('yourgithubfile.json', function(res)
if (not(res.is_error)) then
local response = JSON.decode(res.text)
if (response[ScriptClass] > ScriptVersion) then
print('New Version ('..response[ScriptClass]..') of '..ScriptClass..' is available!')
--install update?
@RobMayer
RobMayer / ArgCoroutine.lua
Last active April 3, 2023 12:26
[TTS] Coroutine with passable arguments
function onload()
cooutside(params)
startLuaCoroutine(self, "normalcoroutine") --this is calling the regular way people do coroutines
end
--This is the usual way people do coroutines, does not allow params to be passed through
function normalcoroutine() --no params can be passed
waitTime(1)
print("1")
waitFrames(60)