Gerard_games

GBHF

Dec 26th, 2021 (edited)
25,282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.59 KB | None | 0 0
  1. wait(3)
  2.  
  3. repeat task.wait() until game:isLoaded()
  4. wait(3)
  5. repeat task.wait() until game:GetService("Players")
  6. repeat task.wait() until game:GetService("Players").LocalPlayer
  7. repeat task.wait() until game:GetService("Players").LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
  8. repeat task.wait() until game:GetService("Workspace"):FindFirstChild('__MAP')
  9.  
  10.  
  11. -- Skidded the teleport from charwar - https://v3rmillion.net/showthread.php?tid=1040972
  12. local PlaceID = game.PlaceId
  13. local AllIDs = {}
  14. local foundAnything = ""
  15. local actualHour = os.date("!*t").hour
  16. local Deleted = false
  17. function TPReturner()
  18. local Site;
  19. if foundAnything == "" then
  20. Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100'))
  21. else
  22. Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100&cursor=' .. foundAnything))
  23. end
  24. local ID = ""
  25. if Site.nextPageCursor and Site.nextPageCursor ~= "null" and Site.nextPageCursor ~= nil then
  26. foundAnything = Site.nextPageCursor
  27. end
  28. local num = 0;
  29. for i,v in pairs(Site.data) do
  30. local Possible = true
  31. ID = tostring(v.id)
  32. if tonumber(v.maxPlayers) > tonumber(v.playing) then
  33. for _,Existing in pairs(AllIDs) do
  34. if num ~= 0 then
  35. if ID == tostring(Existing) then
  36. Possible = false
  37. end
  38. else
  39. if tonumber(actualHour) ~= tonumber(Existing) then
  40. local delFile = pcall(function()
  41. delfile("NotSameServers.json")
  42. AllIDs = {}
  43. table.insert(AllIDs, actualHour)
  44. end)
  45. end
  46. end
  47. num = num + 1
  48. end
  49. if Possible == true then
  50. table.insert(AllIDs, ID)
  51. wait()
  52. pcall(function()
  53. writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  54. wait()
  55. game:GetService("TeleportService"):TeleportToPlaceInstance(PlaceID, ID, game.Players.LocalPlayer)
  56. end)
  57. wait(4)
  58. end
  59. end
  60. end
  61. end
  62.  
  63. function Teleport()
  64. while wait() do
  65. pcall(function()
  66. TPReturner()
  67. if foundAnything ~= "" then
  68. TPReturner()
  69. end
  70. end)
  71. end
  72. end
  73.  
  74. function doprint(text)
  75. if syn or iskrnlclosure then
  76. rconsoleprint(text)
  77. else
  78. print(text)
  79. end
  80. end
  81.  
  82. if game.PlaceId == 6284583030 then
  83. doprint('@@LIGHT_CYAN@@')
  84. doprint("Joined new game ".. game.JobId .. "\n")
  85. workspace.__THINGS.__REMOTES.MAIN:FireServer("b", "get coins")
  86. workspace.__THINGS.__REMOTES.MAIN:FireServer("a", "farm coin")
  87. workspace.__THINGS.__REMOTES.MAIN:FireServer("b", "join coin")
  88.  
  89. local GameLibrary = require(game:GetService("ReplicatedStorage").Framework.Library)
  90.  
  91. local function GetMyPets()
  92. local returntable = {}
  93. for i,v in pairs(GameLibrary.Save.Get().Pets) do
  94. if v.e then
  95. table.insert(returntable, v.uid)
  96. end
  97. end
  98. return returntable
  99. end
  100.  
  101. local function FarmCoin(CoinID, PetID)
  102. game.workspace['__THINGS']['__REMOTES']["join coin"]:InvokeServer({[1] = CoinID, [2] = {[1] = PetID}})
  103. game.workspace['__THINGS']['__REMOTES']["farm coin"]:FireServer({[1] = CoinID, [2] = PetID})
  104. end
  105.  
  106. local GotChest = false
  107. local Area = ""
  108. for q,s in pairs({'Spawn', "Fantasy", "Tech"}) do
  109. if not GotChest then
  110. GameLibrary.WorldCmds.Load(s)
  111. repeat wait() until GameLibrary.WorldCmds.HasLoaded(s)
  112. local ListCoins = game.workspace['__THINGS']['__REMOTES']["get coins"]:InvokeServer({})[1]
  113. for i,v in pairs(ListCoins) do
  114. if v.n == 'Christmas Gingerbread Chest' then
  115. Area = string.gsub(v.a, " FRONT", "")
  116. local Starttick = tick()
  117. doprint('@@LIGHT_GREEN@@')
  118. doprint("Found "..v.n.." in "..Area.." with index "..i.."\n")
  119. repeat wait()
  120. for a,b in pairs(GetMyPets()) do
  121. coroutine.wrap(function()
  122. FarmCoin(i, b)
  123. end)()
  124. end
  125. until not game.workspace['__THINGS']['__REMOTES']["get coins"]:InvokeServer({})[1][i] or tick() > (Starttick + 10)
  126. GotChest = true
  127. end
  128. end
  129.  
  130. if not GotChest then
  131. doprint('@@LIGHT_RED@@')
  132. doprint("There Was No Gingerbread Chest In The " ..s .." World\n")
  133. end
  134. end
  135. end
  136. if GotChest then
  137. doprint('@@LIGHT_GREEN@@')
  138. local Stage = GameLibrary.Save.Get().ChristmasEventQuest.Stage or "n/a"
  139. local Progress = GameLibrary.Save.Get().ChristmasEventQuest.Progress or "n/a"
  140. doprint("OMG Got Christmas Gingerbread Chest in ".. Area.."\nNew Progress: "..Progress.." on Stage "..Stage.."\n\n")
  141. else
  142. doprint('@@LIGHT_RED@@')
  143. doprint("not got Christmas Gingerbread Chest\n\n")
  144. end
  145. end
  146. Teleport()
Add Comment
Please, Sign In to add comment