Advertisement
Guest User

Untitled

a guest
May 20th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. -- Duicen
  2.  
  3. local TrelloModule = {};
  4.  
  5. local Players = game:GetService("Players");
  6. local TeleportService = game:GetService("TeleportService");
  7. local HttpService = game:GetService("HttpService");
  8. local BoardId = "rAp1Mci7";
  9. local BoardAddress = "https://api.trello.com/1/boards/"..BoardId.."/lists"
  10. local BoardHttp = HttpService:GetAsync(BoardAddress);
  11. local BoardJSon = HttpService:JSONDecode(BoardHttp);
  12.  
  13. --
  14. local TeleportGameId;
  15. --
  16. local Boolean = false;
  17.  
  18. function TrelloModule.SendGameID(Int,...)
  19. TeleportCardHttpRequest = HttpService:GetAsync("https://api.trello.com/1/boards/"..BoardId.."/cards");
  20. TeleportCardJson = HttpService:JSONDecode(TeleportCardHttpRequest);
  21. TeleportGameId = "";
  22.  
  23. for a = 1,#TeleportCardJson do
  24. print(TeleportCardJson[a]["name"]);
  25. if string.len(TeleportCardJson[a]["name"]) <=3 then
  26. print(TeleportCardJson[a]["name"]);
  27. if TeleportCardJson[a]["name"] == "On" then
  28. Boolean = true;
  29. elseif TeleportCardJson[a]["name"] == "Off" then
  30. Boolean = false;
  31. end
  32. end
  33. end
  34. for i = 1,#TeleportCardJson do
  35. if Boolean ~= true then return end;
  36. if string.len(TeleportCardJson[i]["name"]) >= 7 then
  37. TeleportGameId = tostring(TeleportGameId..TeleportCardJson[i]["name"]);
  38. if tonumber(TeleportGameId) ~= Int then
  39. local PlayersA = Players:GetPlayers();
  40. for i = 1,#PlayersA do
  41. TeleportService:Teleport(tonumber(TeleportGameId),PlayersA[i]);
  42. wait();
  43. end
  44. end
  45. end
  46. wait();
  47. end
  48. print(tonumber(TeleportGameId))
  49. end
  50.  
  51. while wait(5) do
  52. if script.Parent.Name ~= "TrelloScript" and script == nil then
  53. local PlayersA = Players:GetPlayers();
  54. for i = 1,#PlayersA do
  55. PlayersA[i]:Kick("Something went wrong");
  56. wait();
  57. end
  58. end
  59. print(game.PlaceId,TeleportGameId)
  60.  
  61. TrelloModule.SendGameID(game.PlaceId);
  62.  
  63. end
  64. return TrelloModule;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement