This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |