Advertisement
gumicuci

check if admin

Nov 23rd, 2024 (edited)
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. local httprequest = (syn and syn.request) or (http and http.request) or http_request or (fluxus and fluxus.request) or request
  2. local knowndevs = {"dantelike", "manilasters", "maya_png", "gamertomsuper", "cowlover4499"}
  3. local bindable = Instance.new("BindableFunction")
  4. local HttpService = game:GetService("HttpService")
  5. local TeleportService = game:GetService("TeleportService")
  6.  
  7. function bindable.OnInvoke(response)
  8. if response == "YESS" then
  9. if httprequest then
  10. local servers = {}
  11. local req = httprequest({Url = string.format("https://games.roblox.com/v1/games/%d/servers/Public?sortOrder=Desc&limit=100&excludeFullGames=true", PlaceId)})
  12. local body = HttpService:JSONDecode(req.Body)
  13.  
  14. if body and body.data then
  15. for i, v in next, body.data do
  16. if type(v) == "table" and tonumber(v.playing) and tonumber(v.maxPlayers) and v.playing < v.maxPlayers and v.id ~= game.JobId then
  17. table.insert(servers, 1, v.id)
  18. end
  19. end
  20. end
  21.  
  22. if #servers > 0 then
  23. TeleportService:TeleportToPlaceInstance(game.PlaceId, servers[math.random(1, #servers)], game.Players.LocalPlayer)
  24. else
  25. return notify("Serverhop", "Couldn't find a server.")
  26. end
  27. else
  28. notify("Incompatible Exploit", "Your exploit does not support this command (missing request)")
  29. end
  30. end
  31. end
  32.  
  33. function notify(user)
  34. game.StarterGui:SetCore("SendNotification", {
  35. Title = "POTENTIAL ADMIN!";
  36. Text = user.. " might be an admin, do you wanna hop servers?";
  37. Duration = 15;
  38. Callback = bindable,
  39. Button1 = "YESS";
  40. Button2 = "no.";
  41. })
  42. end
  43.  
  44. game.Players.PlayerAdded:Connect(function(player)
  45. local checked = false
  46. if table.find(knowndevs, player.Name) then
  47. checked = true
  48. end
  49. if checked == false then
  50. if player:WaitForChild("leaderstats").Wins.Value > 1500 then
  51. notify(player.DisplayName)
  52. checked = true
  53. end
  54. end
  55. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement