forked from Root1527/personal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodified.lua
333 lines (310 loc) · 14.3 KB
/
modified.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
--[[
Credits List
ethereum: creating the base sniper
chocolog: providing type.huge
Edmond: offered tips for optimization
Hello from root, I won't be updating this as I have been very demotivated to update this script
it's required to fork this for now. cya
]]--
local osclock = os.clock()
if not game:IsLoaded() then
game.Loaded:Wait()
end
task.wait(15)
game.Players.LocalPlayer.PlayerScripts.Scripts.Core["Idle Tracking"].Enabled = false
game:GetService("RunService"):Set3dRenderingEnabled(false)
local Booths_Broadcast = game:GetService("ReplicatedStorage").Network:WaitForChild("Booths_Broadcast")
local Players = game:GetService('Players')
local getPlayers = Players:GetPlayers()
local PlayerInServer = #getPlayers
local http = game:GetService("HttpService")
local ts = game:GetService("TeleportService")
local rs = game:GetService("ReplicatedStorage")
local snipeNormal, signal
local Library = require(rs:WaitForChild("Library"))
if snipeNormalPets == nil then
snipeNormalPets = false
end
local vu = game:GetService("VirtualUser")
Players.LocalPlayer.Idled:connect(function()
vu:Button2Down(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
task.wait(1)
vu:Button2Up(Vector2.new(0,0),workspace.CurrentCamera.CFrame)
end)
local function processListingInfo(uid, gems, item, version, shiny, amount, boughtFrom, boughtStatus, class, failMessage, snipeNormal)
local gemamount = Players.LocalPlayer.leaderstats["💎 Diamonds"].Value
local snipeMessage ="||".. Players.LocalPlayer.Name .. "||"
local weburl, webContent, webcolor, webStatus
local versionVal = { [1] = "Golden ", [2] = "Rainbow " }
local versionStr = versionVal[version] or (version == nil and "")
local mention = ( class == "Pet" and (Library.Directory.Pets[item].huge or Library.Directory.Pets[item].titanic)) and "<@" .. userid .. ">" or ""
if boughtStatus then
webcolor = tonumber(0x00ff00)
snipeMessage = snipeMessage .. " just sniped ".. amount .."x "
webContent = mention
webStatus = "Success!"
weburl = webhook
if snipeNormal == true then
weburl = normalwebhook
snipeNormal = false
end
else
webcolor = tonumber(0xff0000)
weburl = webhookFail
webStatus = failMessage
snipeMessage = snipeMessage .. " failed to snipe ".. amount .."x "
if snipeNormal == true then
snipeNormal = false
end
if string.find(failMessage, "cannot buy that yet") then
task.wait(0.1)
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, boughtFrom, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
end
end
snipeMessage = snipeMessage .. "**" .. versionStr
if shiny then
snipeMessage = snipeMessage .. " Shiny "
end
snipeMessage = snipeMessage .. item .. "**"
local message1 = {
['content'] = webContent,
['embeds'] = {
{
["author"] = {
["name"] = "sniper",
["icon_url"] = "https://cdn.discordapp.com/attachments/1149218291957637132/1190527382583525416/new-moon-face_1f31a.png?ex=65a22006&is=658fab06&hm=55f8900eef039709c8e57c96702f8fb7df520333ec6510a81c31fc746193fbf2&",
},
['title'] = snipeMessage,
["color"] = webcolor,
["timestamp"] = DateTime.now():ToIsoDate(),
['fields'] = {
{
['name'] = "__Price:__",
['value'] = gems .. " 💎",
},
{
['name'] = "__Bought from:__",
['value'] = "||"..tostring(boughtFrom).."||",
},
{
['name'] = "__Amount:__",
['value'] = amount .. "x",
},
{
['name'] = "__Remaining gems:__",
['value'] = gemamount .. " 💎",
},
{
['name'] = "__PetID:__",
['value'] = "||"..tostring(uid).."||",
},
{
['name'] = "__Status:__",
['value'] = webStatus,
},
{
['name'] = "__Ping:__",
['value'] = math.round(Players.LocalPlayer:GetNetworkPing() * 2000) .. "ms",
}
},
["footer"] = {
["icon_url"] = "https://cdn.discordapp.com/attachments/1149218291957637132/1190527382583525416/new-moon-face_1f31a.png?ex=65a22006&is=658fab06&hm=55f8900eef039709c8e57c96702f8fb7df520333ec6510a81c31fc746193fbf2&", -- optional
["text"] = "Heavily Modified by Root"
}
},
}
}
local jsonMessage = http:JSONEncode(message1)
local success, webMessage = pcall(function()
http:PostAsync(weburl, jsonMessage)
end)
if success == false then
local response = request({
Url = weburl,
Method = "POST",
Headers = {
["Content-Type"] = "application/json"
},
Body = jsonMessage
})
end
end
local function tryPurchase(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
signal = game:GetService("RunService").Heartbeat:Connect(function()
if buytimestamp < workspace:GetServerTimeNow() then
signal:Disconnect()
signal = nil
end
end)
repeat task.wait() until signal == nil
local boughtPet, boughtMessage = rs.Network.Booths_RequestPurchase:InvokeServer(playerid, uid)
processListingInfo(uid, gems, item, version, shiny, amount, username, boughtPet, class, boughtMessage, snipeNormal)
end
Booths_Broadcast.OnClientEvent:Connect(function(username, message)
if type(message) == "table" then
local highestTimestamp = -math.huge -- Initialize with the smallest possible number
local key = nil
local listing = nil
for v, value in pairs(message["Listings"] or {}) do
if type(value) == "table" and value["ItemData"] and value["ItemData"]["data"] then
local timestamp = value["Timestamp"]
if timestamp > highestTimestamp then
highestTimestamp = timestamp
key = v
listing = value
end
end
end
if listing then
local buytimestamp = listing["ReadyTimestamp"]
local listTimestamp = listing["Timestamp"]
local data = listing["ItemData"]["data"]
local gems = tonumber(listing["DiamondCost"])
local uid = key
local item = data["id"]
local version = data["pt"]
local shiny = data["sh"]
local amount = tonumber(data["_am"]) or 1
local playerid = message['PlayerID']
local class = tostring(listing["ItemData"]["class"])
local unitGems = gems / amount
snipeNormal = false
if snipeNormalPets == true and gems == 1 then
snipeNormal = true
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
elseif class == "Pet" then
local type = Library.Directory.Pets[item]
if type.exclusiveLevel and unitGems <= 30000 and item ~= "Banana" and item ~= "Coin" then
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
elseif type.titanic and unitGems <= 10000000 then
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
elseif type.huge and unitGems <= 1500000 then
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
end
elseif (item == "Titanic Christmas Present" or string.find(item, "2024 New Year")) and unitGems <= 30000 then
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
elseif class == "Charm" and unitGems <= 30000 then
if not string.find(item, "Coins") and not string.find(item, "Agility") and not string.find(item, "Bonus") then
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
end
elseif class == "Booth" and unitGems <= 1000 then
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
elseif class == "Misc" and unitGems <= 10000 then
if item == "Rainbow Flag" then
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
elseif item == "Shiny Flag" then
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
elseif item == "Exotic Treasure Flag" then
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
end
elseif class == "Egg" and unitGems <= 100000 then
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
elseif ((string.find(item, "Key") and not string.find(item, "Lower")) or string.find(item, "Ticket")) and unitGems <= 2500 then
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
elseif class == "Enchant" and unitGems <= 50000 then
if item == "Fortune" then
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
elseif string.find(item, "Chest Mimic") then
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
elseif item == "Huge Hunter" then
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
elseif item == "Lucky Block" then
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
elseif item == "Massive Comet" then
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
elseif item == "Super Lightning" then
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
elseif item == "Shiny Hunter" then
coroutine.wrap(tryPurchase)(uid, gems, item, version, shiny, amount, username, class, playerid, buytimestamp, listTimestamp, snipeNormal)
return
end
end
end
end
end)
local function jumpToServer()
local sfUrl = "https://games.roblox.com/v1/games/%s/servers/Public?sortOrder=%s&limit=%s&excludeFullGames=true"
local req = request({ Url = string.format(sfUrl, 15502339080, "Desc", 50) })
local body = http:JSONDecode(req.Body)
local deep = math.random(1, 3)
if deep > 1 then
for i = 1, deep, 1 do
req = request({ Url = string.format(sfUrl .. "&cursor=" .. body.nextPageCursor, 15502339080, "Desc", 50) })
body = http:JSONDecode(req.Body)
task.wait(0.1)
end
end
local servers = {}
if body and body.data then
for i, v in next, body.data do
if type(v) == "table" and tonumber(v.playing) and tonumber(v.maxPlayers) and v.playing < v.maxPlayers and v.id ~= game.JobId then
table.insert(servers, v.id)
end
end
end
local randomCount = #servers
if not randomCount then
randomCount = 2
end
ts:TeleportToPlaceInstance(15502339080, servers[math.random(1, randomCount)], game:GetService("Players").LocalPlayer)
end
if PlayerInServer < 20 then
while task.wait(10) do
jumpToServer()
end
end
for i = 1, PlayerInServer do
for ii = 1,#alts do
if getPlayers[i].Name == alts[ii] and alts[ii] ~= Players.LocalPlayer.Name then
while task.wait(10) do
jumpToServer()
end
end
end
end
Players.PlayerRemoving:Connect(function(player)
getPlayers = Players:GetPlayers()
PlayerInServer = #getPlayers
if PlayerInServer < 20 then
while task.wait(10) do
jumpToServer()
end
end
end)
Players.PlayerAdded:Connect(function(player)
for i = 1,#alts do
if player.Name == alts[i] and alts[i] ~= Players.LocalPlayer.Name then
task.wait(math.random(0, 60))
while task.wait(10) do
jumpToServer()
end
end
end
end)
local hopDelay = math.random(720, 1000)
while task.wait(1) do
if math.floor(os.clock() - osclock) >= hopDelay then
while task.wait(10) do
jumpToServer()
end
end
end