Advertisement
anonmods

Royale High Script

Feb 7th, 2022
16,458
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.13 KB | None | 0 0
  1. print("made by baconlord")
  2. if game.PlaceId == 1067560271 then
  3. repeat wait() until game:IsLoaded() wait()
  4. spawn(function()
  5. while wait () do
  6. pcall(function()
  7. game.Players.LocalPlayer.Character.Humanoid.Jump = true
  8. end) end end)
  9. wait(6)
  10. spawn(function()
  11. while wait () do
  12. pcall(function()
  13. for i,v in pairs(game.Workspace.DIAMONDS:GetChildren()) do
  14. if v.Name == "specialdiamond" or v.Name == "Pink Diamond" or v.Name == "Green Diamond" or V.Name == "Red Diamond" or V.Name == "Yellow Diamond" then
  15. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(v.Position)
  16. wait()
  17. end end end) end end)
  18. local PlaceID = game.PlaceId
  19. local AllIDs = {}
  20. local foundAnything = ""
  21. local actualHour = os.date("!*t").hour
  22. local Deleted = false
  23. local File = pcall(function()
  24. AllIDs = game:GetService('HttpService'):JSONDecode(readfile("NotSameServers.json"))
  25. end)
  26. if not File then
  27. table.insert(AllIDs, actualHour)
  28. writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  29. end
  30. function TPReturner()
  31. local Site;
  32. if foundAnything == "" then
  33. Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100'))
  34. else
  35. Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100&cursor=' .. foundAnything))
  36. end
  37. local ID = ""
  38. if Site.nextPageCursor and Site.nextPageCursor ~= "null" and Site.nextPageCursor ~= nil then
  39. foundAnything = Site.nextPageCursor
  40. end
  41. local num = 0;
  42. for i,v in pairs(Site.data) do
  43. local Possible = true
  44. ID = tostring(v.id)
  45. if tonumber(v.maxPlayers) > tonumber(v.playing) then
  46. for _,Existing in pairs(AllIDs) do
  47. if num ~= 0 then
  48. if ID == tostring(Existing) then
  49. Possible = false
  50. end
  51. else
  52. if tonumber(actualHour) ~= tonumber(Existing) then
  53. local delFile = pcall(function()
  54. delfile("NotSameServers.json")
  55. AllIDs = {}
  56. table.insert(AllIDs, actualHour)
  57. end)
  58. end
  59. end
  60. num = num + 1
  61. end
  62. if Possible == true then
  63. table.insert(AllIDs, ID)
  64. wait()
  65. pcall(function()
  66. writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  67. wait()
  68. game:GetService("TeleportService"):TeleportToPlaceInstance(PlaceID, ID, game.Players.LocalPlayer)
  69. end)
  70. wait(4)
  71. end
  72. end
  73. end
  74. end
  75.  
  76. function Teleport()
  77. while wait() do
  78. pcall(function()
  79. TPReturner()
  80. if foundAnything ~= "" then
  81. TPReturner()
  82. end
  83. end)
  84. end end
  85. wait(30)
  86. Teleport()
  87. else
  88. game:GetService("TeleportService"):Teleport(1067560271, LocalPlayer)
  89. end
  90.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement