Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --ROBLOX LAUNCHER
- --Find the current version file
- function FindRbxPlayer()
- function scandir(directory,mode)
- local i, t, popen = 0, {}, io.popen
- for filename in popen('dir "'..directory..'" /b '.. mode):lines() do
- i = i + 1
- t[i] = filename
- end
- return t
- end
- for
- i,v in pairs (scandir("%appdata%/../Local/Roblox/Versions","/ad"))
- do
- for k,x in pairs (scandir("%appdata%/../Local/Roblox/Versions/"..v,"/a-d")) do
- if x=="RobloxPlayerBeta.exe" then
- return v
- end
- end
- end
- end
- --sets the current version to the found version
- local CURRENTVERSION=FindRbxPlayer()
- --These are here just because
- local presets= { ["kk"]=157005930, ["cf"]=101554146,["piggy"]=155856024,["mc"]=170222579, ["ap"]=1600503;
- ["aph"]=99015795}
- function LaunchGame()
- print("Paste a place ID here.")
- local input=io.stdin:read()--accept user input
- if
- input=="RESET" --allow resetting to find new version in case of update
- then
- CURRENTVERSION=FindRbxPlayer()
- LaunchGame()
- end
- local ID=( presets[input] or input)--Did you shortcut?
- presets["last"]=input
- print("Launching game, please wait..")
- --launches a game with the given ID
- os.execute("%appdata%/../Local/Roblox/Versions/"..CURRENTVERSION.."/RobloxPlayerBeta.exe --id "..ID)
- print("Game closed.")
- LaunchGame() --allows you to paste another ID
- end
- LaunchGame()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement