Advertisement
zhangfengshan

Untitled

Feb 19th, 2023 (edited)
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.73 KB | None | 0 0
  1. --Wait until game loads
  2. repeat
  3. wait()
  4. until game:IsLoaded()
  5.  
  6. --Stops script if on a different game
  7. if game.PlaceId ~= 8737602449 then
  8. return
  9. end
  10.  
  11. --Anti-AFK
  12. for i, v in pairs(getconnections(game:GetService("Players").LocalPlayer.Idled)) do
  13. v:Disable()
  14. end
  15. wait(5)
  16.  
  17. --Checks what executor is in use
  18. if string.find(identifyexecutor(), "Synapse X") then
  19. syn.queue_on_teleport("loadstring(game:HttpGet('https://raw.githubusercontent.com/zntly/pls-donate-edit/main/sc.lua'))()")
  20. else
  21. game.StarterGui:SetCore("SendNotification", {
  22. Title = "Not using Synapse X",
  23. Text = "Make sure this script is in the autoexec folder or it won't work properly",
  24. Duration = 15
  25. })
  26. end
  27.  
  28. --Discord Webhook Textbox
  29. local ScreenGui = Instance.new("ScreenGui")
  30. local TextBox = Instance.new("TextBox")
  31. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  32. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  33. if isfile("PLSDONATE-WEBHOOK.txt") then
  34. getgenv().webhook = game:GetService("HttpService"):JSONDecode(readfile("PLSDONATE-WEBHOOK.txt"))
  35. TextBox.Text = getgenv().webhook
  36. else
  37. TextBox.Text = "Discord Webhook URL"
  38. end
  39. TextBox.Parent = ScreenGui
  40. TextBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  41. TextBox.BackgroundTransparency = 0.500
  42. TextBox.ClipsDescendants = true
  43. TextBox.Position = UDim2.new(0.898658693, 0, 0.963724315, 0)
  44. TextBox.Size = UDim2.new(0, 136, 0, 30)
  45. TextBox.Font = Enum.Font.SourceSans
  46. TextBox.TextColor3 = Color3.fromRGB(0, 0, 0)
  47. TextBox.TextSize = 14.000
  48. local function getText()
  49. local script = Instance.new("LocalScript", TextBox)
  50. local text = script.Parent
  51. text.FocusLost:Connect(function()
  52. getgenv().webhook = text.Text
  53. writefile("PLSDONATE-WEBHOOK.txt", game:GetService("HttpService"):JSONEncode(getgenv().webhook))
  54. end)
  55. end
  56. coroutine.wrap(getText)()
  57.  
  58. --Variables
  59. local unclaimed = {}
  60. local counter
  61. local donation
  62. local errCount = 0
  63. local booths = {
  64. ["1"] = "72, 4, 36",
  65. ["2"] = "83, 4, 161",
  66. ["3"] = "11, 4, 36",
  67. ["4"] = "100, 4, 59",
  68. ["5"] = "72, 4, 166",
  69. ["6"] = "2, 4, 42",
  70. ["7"] = "-9, 4, 52",
  71. ["8"] = "10, 4, 166",
  72. ["9"] = "-17, 4, 60",
  73. ["10"] = "35, 4, 173",
  74. ["11"] = "24, 4, 170",
  75. ["12"] = "48, 4, 29",
  76. ["13"] = "24, 4, 33",
  77. ["14"] = "101, 4, 142",
  78. ["15"] = "-18, 4, 142",
  79. ["16"] = "60, 4, 33",
  80. ["17"] = "35, 4, 29",
  81. ["18"] = "0, 4, 160",
  82. ["19"] = "48, 4, 173",
  83. ["20"] = "61, 3, 170",
  84. ["21"] = "91, 4, 151",
  85. ["22"] = "-24, 4, 72",
  86. ["23"] = "-28, 4, 88",
  87. ["24"] = "92, 4, 51",
  88. ["25"] = "-28, 4, 112",
  89. ["26"] = "-24, 3, 129",
  90. ["27"] = "83, 4, 42",
  91. ["28"] = "-8, 4, 151"
  92. }
  93.  
  94. --Finds unclaimed booths
  95. for i, v in pairs(game:GetService("Players").LocalPlayer.PlayerGui.MapUIContainer.MapUI.BoothUI:GetChildren()) do
  96. if (v.Details.Owner.Text == "unclaimed") then
  97. table.insert(unclaimed, tonumber(string.match(tostring(v), "%d+")))
  98. end
  99. end
  100. local claimCount = #unclaimed
  101.  
  102. --Claim booth function
  103. function boothclaim()
  104. local claimevent = require(game.ReplicatedStorage.Remotes).Event("ClaimBooth")
  105. claimevent:InvokeServer(unclaimed[1])
  106. end
  107.  
  108. --Checks if booth claim fails
  109. while not pcall(boothclaim) do
  110. if errCount >= claimCount then
  111. local Servers = game.HttpService:JSONDecode(game:HttpGet("https://games.roblox.com/v1/games/8737602449/servers/Public?sortOrder=Desc&limit=100"))
  112. for i, v in pairs(Servers.data) do
  113. if v.playing > 19 and v.playing < 27 then
  114. game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, v.id)
  115. end
  116. end
  117. end
  118. errCount = errCount + 1
  119. end
  120.  
  121. --Walks to booth
  122. game.Players.LocalPlayer.Character.Humanoid:MoveTo(Vector3.new(booths[tostring(unclaimed[1])]:match("(.+), (.+), (.+)")))
  123. local atBooth = false
  124. game.Players.LocalPlayer.Character.Humanoid.MoveToFinished:Connect(function(reached)
  125. atBooth = true
  126. end)
  127.  
  128. --Just in case you run into a bench
  129. while not atBooth do
  130. wait(.25)
  131. if game.Players.LocalPlayer.Character.Humanoid:GetState() == Enum.HumanoidStateType.Seated then
  132. game.Players.LocalPlayer.Character.Humanoid.Jump = true
  133. end
  134. end
  135.  
  136. --Turns charcter to face away from booth
  137. game.Players.LocalPlayer.Character:SetPrimaryPartCFrame(CFrame.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position, Vector3.new(40, 14, 101)))
  138.  
  139. --Booth text
  140. while true do
  141. counter = 0
  142. local Players = game:GetService("Players")
  143. local Raised = Players.LocalPlayer.leaderstats.Raised
  144. local boothText
  145. function update(text)
  146. --Checks if you have 1000+ robux raised
  147. --4 digit numbers are censored so they will be shortened
  148. if Raised.Value > 999 then
  149. text = string.format("%.1fk", text / 10 ^ 3)
  150. --Booth text when 1000+ robux raised
  151. boothText = tostring('<stroke color="#ffffff" thickness="2"><font color="#006400" face="PermanentMarker">Dont have any money after buying Korblox, pls help! Goal: ' .. text .. "</font></stroke>")
  152. else
  153. --Booth text when under 1000 robux raised
  154. boothText = tostring('<stroke color="#ffffff" thickness="2"><font color="#006400" face="PermanentMarker">Dont have any money after buying Korblox, pls help! Goal: ' .. Raised.value .. " / " .. text .. "</font></stroke>")
  155. end
  156. --Updates the booth text
  157. require(game.ReplicatedStorage.Remotes).Event("SetBoothText"):FireServer(boothText, "booth")
  158. end
  159. --More checks for 1000+ raised
  160. if Raised.Value > 999 then
  161. update(tostring(math.ceil(tonumber(Raised.Value + 1) / 100) * 100))
  162. else
  163. update(tostring(Raised.Value + 5))
  164. end
  165.  
  166. --Waits for a donation
  167. local RaisedC = Players.LocalPlayer.leaderstats.Raised.value
  168. while (Players.LocalPlayer.leaderstats.Raised.value == RaisedC) do
  169. wait(1)
  170. counter = counter + 1
  171. --Server hops after 1800 seconds (30 minutes)
  172. if counter >= 1800 then
  173. --Random wait time in case of interference from alts
  174. wait(math.random(1, 60))
  175. local Servers = game.HttpService:JSONDecode(game:HttpGet("https://games.roblox.com/v1/games/8737602449/servers/Public?sortOrder=Desc&limit=100"))
  176. for i, v in pairs(Servers.data) do
  177. if v.playing > 19 and v.playing < 27 then
  178. game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, v.id)
  179. end
  180. end
  181. end
  182. end
  183.  
  184. --Checks for Discord Webhook
  185. if getgenv().webhook then
  186. local LogService = Game:GetService("LogService")
  187. local logs = LogService:GetLogHistory()
  188. local donation
  189. --Tries to grabs donation message from logs
  190. if string.find(logs[#logs].message, game:GetService("Players").LocalPlayer.Name) then
  191. donation = tostring(logs[#logs].message.. " (Total: ".. Players.LocalPlayer.leaderstats.Raised.value.. ")")
  192. else
  193. donation = tostring("💰 Somebody tipped ".. Players.LocalPlayer.leaderstats.Raised.value - RaisedC.. " Robux to ".. game:GetService("Players").LocalPlayer.Name.. " (Total: " .. Players.LocalPlayer.leaderstats.Raised.value.. ")")
  194. end
  195.  
  196. --Sends to webhook
  197. local request = http_request or request or HttpPost or syn.request
  198. request({
  199. Url = getgenv().webhook,
  200. Body = game:GetService("HttpService"):JSONEncode({["content"] = donation}),
  201. Method = "POST",
  202. Headers = {["content-type"] = "application/json"}
  203. })
  204. end
  205.  
  206. --30 second wait so the booth doesn't update instantly
  207. wait(30)
  208. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement