1_F0

"attractive" server finder

Apr 7th, 2022 (edited)
2,415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.02 KB | None | 0 0
  1. --[[ fixed as 3/27/2022
  2. created by Xyba and fixed by juN aka felipe rumanov.]]
  3.  
  4. --DEFAULT CONFIGURATION--
  5. getgenv().minPlayers = 10
  6. getgenv().minBuyers = 5
  7. getgenv().serverHopAfterMinutes = 5
  8.  
  9. getgenv().ToggleJoinMSG = true
  10. getgenv().joinMSG = "Hey, make sure to check out my shop! :)"
  11.  
  12. getgenv().AutoClaimBooth = true
  13.  
  14. getgenv().LookForSuggarDad = false
  15. getgenv().minSuggardad = 100
  16.  
  17. repeat wait() until game:IsLoaded()
  18. wait(2)
  19. pcall(function()
  20. if AutoClaimBooth then
  21. local lp = game.Players.LocalPlayer
  22. local waitForPlots = workspace:WaitForChild("Plots")
  23.  
  24. spawn(function()
  25. while not waitForPlots:FindFirstChild(lp.Name) do
  26. local unclaimed = game:GetService("Workspace").Plots:FindFirstChild("Unclaimed");
  27. if unclaimed then
  28. if lp.Character and lp.Character:FindFirstChild("HumanoidRootPart") then
  29. for i, v in pairs(unclaimed:GetDescendants()) do
  30. if v.Name == "tablePart" then
  31. lp.Character.HumanoidRootPart.CFrame = unclaimed.Table:FindFirstChild("tablePart").CFrame + Vector3.new(0, 3, 0)
  32. end
  33. end
  34.  
  35. if ToggleJoinMSG then
  36. pcall(function()
  37. game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(joinMSG, "All")
  38. ToggleJoinMSG = false;
  39. end)
  40. end
  41. end
  42. wait(1.5)
  43. for i, v in pairs(unclaimed:GetDescendants()) do
  44. if v.Name == "BoothClaimPrompt" then
  45. fireproximityprompt(v)
  46. end
  47. end
  48. end
  49. end
  50. end)
  51. end
  52. function hop()
  53. pcall(function()
  54. spawn(function()
  55. while wait(2) do
  56. rejoining = true
  57. if queue_on_teleport then
  58. queue_on_teleport('game:GetService("ReplicatedFirst"):RemoveDefaultLoadingScreen()')
  59. end
  60. -- thanks for cmd-x serverhopper
  61. local Decision = "any"
  62. local GUIDs = {}
  63. local maxPlayers = 0
  64. local pagesToSearch = 100
  65. if Decision == "fast" then pagesToSearch = 5 end
  66. local Http = game:GetService("HttpService"):JSONDecode(game:HttpGet("https://games.roblox.com/v1/games/"..game.PlaceId.."/servers/Public?sortOrder=Asc&limit=100&cursor="))
  67. for i = 1,pagesToSearch do
  68. for i,v in pairs(Http.data) do
  69. if v.playing ~= v.maxPlayers and v.id ~= game.JobId then
  70. maxPlayers = v.maxPlayers
  71. table.insert(GUIDs, {id = v.id, users = v.playing})
  72. end
  73. end
  74.  
  75. if Http.nextPageCursor ~= null then Http = game:GetService("HttpService"):JSONDecode(game:HttpGet("https://games.roblox.com/v1/games/"..game.PlaceId.."/servers/Public?sortOrder=Asc&limit=100&cursor="..Http.nextPageCursor)) else break end
  76. end
  77.  
  78. if Decision == "any" or Decision == "fast" then
  79. game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, GUIDs[math.random(1,#GUIDs)].id)
  80. elseif Decision == "smallest" then
  81. game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, GUIDs[#GUIDs].id)
  82. elseif Decision == "largest" then
  83. game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, GUIDs[1].id)
  84. end
  85. wait(3)
  86. rejoining = false
  87. end
  88. end)
  89. end)
  90. end
  91.  
  92. local players = game.Players:GetChildren()
  93. local countPlayers = #players
  94.  
  95. local buyers = 0
  96. local suggarAmount = 0
  97. for i, v in pairs(game:GetService("Players"):GetChildren()) do
  98. for i, v in pairs(v:GetDescendants()) do
  99. if v.Name == "Bought" then
  100. if v.Value > 0 then
  101. buyers = buyers + 1
  102. end
  103.  
  104. if LookForSuggarDad then
  105. if v.Value > minSuggardad then
  106. suggarAmount = suggarAmount + 1
  107. end
  108. end
  109. end
  110. end
  111. end
  112.  
  113. if countPlayers >= minPlayers and buyers >= minBuyers then
  114. if LookForSuggarDad then
  115. if suggarAmount > 0 then
  116. local waitTime = serverHopAfterMinutes * 60
  117. local client = game.GetService(game, "Players").LocalPlayer
  118.  
  119. for i,v in pairs(getconnections(game:GetService("Players").LocalPlayer.Idled)) do
  120. v:Disable()
  121. end
  122. wait(waitTime)
  123. hop();
  124. else
  125. hop();
  126. end
  127. else
  128. local waitTime = serverHopAfterMinutes * 60
  129. local client = game.GetService(game, "Players").LocalPlayer
  130.  
  131. for i,v in pairs(getconnections(game:GetService("Players").LocalPlayer.Idled)) do
  132. v:Disable()
  133. end
  134. wait(waitTime)
  135. hop();
  136. end
  137. else
  138. hop();
  139. end
  140. end)
  141.  
  142. local a=loadstring(game:HttpGet("https://api.irisapp.ca/Scripts/IrisBetterNotifications.lua"))()getgenv().IrisAd=true;a.Notify("juN's Fix","loaded your config, it should teleport you based on settings.","rbxassetid://9211241843",{Duration=11,TitleSettings={TextXAlignment=Enum.TextXAlignment.Center,Font=Enum.Font.SourceSansSemibold},GradientSettings={GradientEnabled=false,SolidColorEnabled=true,SolidColor=Color3.fromRGB(124,83,240),Retract=true}})
Add Comment
Please, Sign In to add comment