Advertisement
AstraTheFox

Untitled

Dec 5th, 2024 (edited)
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.36 KB | None | 0 0
  1. repeat task.wait() until game:IsLoaded()
  2. print("Starting vote process...")
  3.  
  4. local Endpoint = game:GetService("ReplicatedStorage"):WaitForChild("endpoints", 10)
  5. local clientToServer = Endpoint:FindFirstChild("client_to_server")
  6.  
  7. local VoteStart = clientToServer:FindFirstChild("vote_start")
  8. local FinishedVote = clientToServer:FindFirstChild("set_game_finished_vote")
  9. local VoteSkip = clientToServer:FindFirstChild("vote_wave_skip")
  10. VoteStart:InvokeServer()
  11.  
  12. _G.Condition = true
  13. print("Global condition set to true.")
  14.  
  15. local function fireGameFinishedVote()
  16.     while _G.Condition do
  17.         task.wait(10)
  18.         local args = {
  19.             [1] = "replay"
  20.         }
  21.  
  22.         print("Firing set_game_finished_vote with args:", args)
  23.  
  24.         local success, response = pcall(function()
  25.             return FinishedVote:InvokeServer(unpack(args))
  26.         end)
  27.  
  28.         if not success then
  29.             print("Error invoking set_game_finished_vote:", response)
  30.         else
  31.             print("Response from server:", response)
  32.         end
  33.     end
  34. end
  35.  
  36. coroutine.wrap(fireGameFinishedVote)()
  37.  
  38. task.spawn(function()
  39.     while _G.Condition do
  40.         task.wait(1)
  41.         print("Sending vote_wave_skip request...")
  42.         VoteSkip:InvokeServer()
  43.     end
  44. end)
  45.  
  46. syn.queue_on_teleport([[
  47. loadstring(game:HttpGet("https://pastebin.com/raw/AhG0ewv4", true))()
  48. ]])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement