Advertisement
CloneTrooper1019

GetRobloxServerInstance

Aug 26th, 2014
583
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. function GetRobloxServerInstance(placeId)
  2.     -- Returns a place instance string if it can obtain one, or false.
  3.     -- Can be used in combination with TeleportService:TeleportToPlaceInstance()
  4.     local serverJson
  5.     local requests = 0
  6.     local http = game:GetService("HttpService")
  7.     while not serverJson do
  8.         requests = requests + 1
  9.         if requests > 15 then
  10.             return false,"Error, unable to establish connection to Roblox servers"
  11.         end
  12.         serverJson = http:GetAsync("http://www.rproxy.tk/Game/Placelauncher.ashx?request=RequestGame&placeId="..placeId)
  13.         wait(.25)
  14.     end
  15.     return http:JSONDecode(serverJson).jobId
  16. end
  17.  
  18. print(createRobloxServer(174525867))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement