forked from Zglad-Creator/Respectful_Residents
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.lua
More file actions
479 lines (420 loc) · 14.7 KB
/
Copy pathMain.lua
File metadata and controls
479 lines (420 loc) · 14.7 KB
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
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
-- First, load Rayfield
local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
-- Create a Window
local Window = Rayfield:CreateWindow({
Name = "Radiant Residents: Zgladius",
LoadingTitle = "Zgladius",
LoadingSubtitle = "Please wait...",
ConfigurationSaving = {
Enabled = true,
FolderName = "DefenseConfig",
FileName = "Settings"
}
})
-- Notify on load
Rayfield:Notify({
Title = "Enjoy!",
Content = "Made By Zgladius",
Duration = 6.5,
Image = 4483362458,
Actions = {
Ignore = {
Name = "Thanks!",
Callback = function()
print("NP bro")
end
}
}
})
-- Defense Tab
local DefenseTab = Window:CreateTab("Defense Controls")
DefenseTab:CreateButton({
Name = "Skip Cutscene",
Callback = function()
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("SkippedCutscene"):FireServer()
end,
})
DefenseTab:CreateToggle({
Name = "Auto Charge Bunker Defences",
CurrentValue = false,
Callback = function(Value)
while Value do
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("SecurityCamera"):WaitForChild("ChangingHealth"):FireServer()
wait(0.4)
end
end,
})
DefenseTab:CreateToggle({
Name = "Auto Charge Antivirus",
CurrentValue = false,
Callback = function(Value)
local args = {[1] = "Healed"}
while Value do
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("Virus"):FireServer(unpack(args))
wait(5)
end
end,
})
DefenseTab:CreateToggle({
Name = "Auto Charge Generator",
CurrentValue = false,
Callback = function(Value)
while Value do
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("ChangingGeneratorHealth"):FireServer()
wait(5)
end
end,
})
DefenseTab:CreateToggle({
Name = "Auto Heal",
CurrentValue = false,
Callback = function(Value)
while Value do
local args = {[1] = -500, [2] = true}
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("ChangingPlayerHealth"):FireServer(unpack(args))
wait(0.1)
end
end,
})
-- Utility Operations Tab
local UtilityTab = Window:CreateTab("Utility Operations")
UtilityTab:CreateToggle({
Name = "Auto Clean Toilet",
CurrentValue = false,
Callback = function(Value)
while Value do
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("CleanedToilet"):FireServer()
wait(10)
end
end,
})
UtilityTab:CreateToggle({
Name = "Auto Clean Trash",
CurrentValue = false,
Callback = function(Value)
while Value do
for count = 1, 20 do
local args = {[1] = "Trash" .. count}
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("PickingUpTrash"):FireServer(unpack(args))
end
wait(6)
end
end,
})
UtilityTab:CreateToggle({
Name = "Auto Fix Pipes",
CurrentValue = false,
Callback = function(Value)
while Value do
for i = 1, 7 do
local pipeName = "Pipe" .. i
local args = {
[1] = workspace:WaitForChild("Basement"):WaitForChild("Important"):WaitForChild("Pipes"):WaitForChild(pipeName)
}
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("FixingPipes"):FireServer(unpack(args))
end
wait(10)
end
end,
})
UtilityTab:CreateToggle({
Name = "Auto Repair Water Leaks",
CurrentValue = false,
Callback = function(Value)
while Value do
for i = 1, 7 do
local pointName = "WaterLeakPoint" .. i
local args = {
[1] = workspace:WaitForChild("Basement"):WaitForChild("Important"):WaitForChild("WaterDropletSpawnpoint"):WaitForChild(pointName)
}
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("FixWaterLeak"):FireServer(unpack(args))
end
wait(7)
end
end,
})
UtilityTab:CreateToggle({
Name = "Auto Sleep",
CurrentValue = false,
Callback = function(Value)
while Value do
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("SleepVote"):FireServer()
wait(240) -- Wait 4 minutes
end
end,
})
-- Special Controls Tab
local SpecialControlsTab = Window:CreateTab("Special Controls")
SpecialControlsTab:CreateButton({
Name = "Respawn",
Callback = function()
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("Respawn"):FireServer()
end,
})
SpecialControlsTab:CreateButton({
Name = "Start BBQ ending",
Callback = function()
local args = {
[1] = true
}
game:GetService("ReplicatedStorage"):WaitForChild("StoryRandomEventsFolder"):WaitForChild("BBQ"):WaitForChild("Events"):WaitForChild("StartEnding"):FireServer(unpack(args))
end,
}) -- This comma was missing
-- Toggle for Auto Respawn
SpecialControlsTab:CreateToggle({
Name = "Auto Respawn",
CurrentValue = false,
Callback = function(Value)
while Value do
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("Respawn"):FireServer()
wait(300) -- Wait 5 minutes (300 seconds)
end
end,
})
-- "Give Stuff" Tab
local GiveStuffTab = Window:CreateTab("Give Stuff")
-- Button for giving 200 of everything
GiveStuffTab:CreateButton({
Name = "Give 200 of everything",
Callback = function()
local replicatedStorage = game:GetService("ReplicatedStorage")
local players = game:GetService("Players")
local localPlayer = players.LocalPlayer
-- Assuming this is the structure of your GUI and item IDs
local gui = localPlayer.PlayerGui.BasementItemGUIs.Computer.Background.Market
local productIDs = {
Battery = gui.ProductIDs.Battery,
BugSpray = gui.ProductIDs.BugSpray,
Water = gui.ProductIDs.Water,
CannedFood = gui.ProductIDs.CannedFood,
DuctTape = gui.ProductIDs.DuctTape,
Medkit = gui.ProductIDs.Medkit,
Soap = gui.ProductIDs.Soap,
Toolbox = gui.ProductIDs.Toolbox
}
local event = replicatedStorage.Events.BoughtProductFromMarket
-- Function to purchase a specific item 200 times
local function purchaseItem(productID)
for i = 1, 200 do
event:FireServer(productID)
end
end
-- Trigger purchases for all items
for itemName, id in pairs(productIDs) do
purchaseItem(id)
end
end
})
local itemNames = {"Battery", "BugSpray", "Water", "CannedFood", "DuctTape", "Medkit", "Soap", "Toolbox"}
local players = game:GetService("Players")
local localPlayer = players.LocalPlayer
local replicatedStorage = game:GetService("ReplicatedStorage")
for _, itemName in ipairs(itemNames) do
GiveStuffTab:CreateInput({
Name = itemName,
PlaceholderText = "Enter amount for " .. itemName,
RemoveTextAfterFocusLost = false,
Callback = function(Text)
local amount = tonumber(Text)
if amount then
local productID = localPlayer.PlayerGui:FindFirstChild("BasementItemGUIs", true).Computer.Background.Market.ProductIDs[itemName]
if productID then
for i = 1, amount do
replicatedStorage.Events.BoughtProductFromMarket:FireServer(productID)
end
else
warn("Product ID for " .. itemName .. " not found")
end
else
warn("Invalid amount entered for " .. itemName)
end
end,
})
end
-- Special Controls Tab
local SpecialControlsTab = Window:CreateTab("Special Controls")
-- List of all weapons
local weaponNames = {"Syringe", "Wrench", "PowerFist", "Crowbar", "SkeletonMace"}
-- Function to acquire a weapon
local function acquireWeapon(weaponName)
local args = {[1] = weaponName}
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("StartVote"):FireServer(unpack(args))
end
-- Create a button for each weapon
for _, weapon in ipairs(weaponNames) do
SpecialControlsTab:CreateButton({
Name = "Get " .. weapon,
Callback = function()
acquireWeapon(weapon)
end,
})
end
-- Create a button to give all weapons
SpecialControlsTab:CreateButton({
Name = "Give All Weapons",
Callback = function()
for _, weapon in ipairs(weaponNames) do
acquireWeapon(weapon)
end
end,
})
-- New Items Control Tab
local ItemsControlTab = Window:CreateTab("Items Control")
-- Function to adjust item amounts
local function adjustItemAmount(itemName, amount)
local args = {
[1] = "Pay Virus Requested Amount",
[2] = itemName,
[3] = amount
}
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("StartVote"):FireServer(unpack(args))
end
-- Iterate through each item in the folder
for _, item in pairs(workspace.Basement.Important.Items:GetChildren()) do
local itemName = item.Name -- Assume the item name is the folder's name
-- Create input for adding or removing items
ItemsControlTab:CreateInput({
Name = "Adjust " .. itemName,
PlaceholderText = "Enter amount to add (positive) or remove (negative)",
RemoveTextAfterFocusLost = false,
Callback = function(Text)
local amount = tonumber(Text)
if amount then
adjustItemAmount(itemName, -amount) -- Negative to add items due to script specifics
end
end,
})
-- Create a button for quick adding of items
ItemsControlTab:CreateButton({
Name = "Add 300 " .. itemName,
Callback = function()
adjustItemAmount(itemName, -300) -- Adds 300 items
end,
})
-- Create a button for quick removal of items
ItemsControlTab:CreateButton({
Name = "Remove 300 " .. itemName,
Callback = function()
adjustItemAmount(itemName, 300) -- Removes 300 items
end,
})
end
-- Add button to give 999 of all items
ItemsControlTab:CreateButton({
Name = "Give 999 of All Items",
Callback = function()
for _, item in pairs(workspace.Basement.Important.Items:GetChildren()) do
local itemName = item.Name -- Assumes item names are the folder's names
adjustItemAmount(itemName, -999) -- Adds 999 items since negative amounts are used to add items
end
end,
})
-- Function to remove exact amount of each item
local function removeExactAmount(itemName, amount)
local args = {
[1] = "Pay Virus Requested Amount",
[2] = itemName,
[3] = amount -- Positive number to remove the exact amount held
}
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("StartVote"):FireServer(unpack(args))
end
-- Create a button to remove all supplies based on the exact amounts taken
ItemsControlTab:CreateButton({
Name = "Remove Taken Supplies",
Callback = function()
for _, item in pairs(workspace.GameInfo.TakenItems:GetChildren()) do
local itemName = item.Name -- Assumes item names are the folder's names
local currentAmount = item.Value -- Assuming each child has a Value property with the number held
if currentAmount > 0 then
removeExactAmount(itemName, currentAmount)
end
end
end,
})
-- Create a new tab called 'Extra'
local ExtraTab = Window:CreateTab("Extra")
-- Create a text input in the 'Extra' tab
ExtraTab:CreateInput({
Name = "Enter Value",
PlaceholderText = "Type here and press enter...",
RemoveTextAfterFocusLost = false,
Callback = function(Text)
local args = {
[1] = Text, -- First parameter from input
[2] = Text -- Second parameter from input
}
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("StartVote"):FireServer(unpack(args))
end,
})
ExtraTab:CreateButton({
Name = "Vote for Myself x4",
Callback = function()
local player = game:GetService("Players").LocalPlayer
local args = {player, true}
local event = game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("ActiveVoteCounting")
for i = 1, 4 do
event:FireServer(unpack(args))
end
end,
})
-- 'Upgrade Weapons' tab
local UpgradeWeaponsTab = Window:CreateTab("Upgrade Weapons")
local weapons = game:GetService("ReplicatedStorage").Weapons.Tools:GetChildren()
-- Function to upgrade a weapon
local function upgradeWeapon(weaponName)
local args = {
[1] = "Upgrade Weapon: " .. weaponName,
[2] = weaponName
}
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("StartVote"):FireServer(unpack(args))
end
-- Create a Button for Each weapon
for _, weapon in pairs(weapons) do
UpgradeWeaponsTab:CreateButton({
Name = "Upgrade " .. weapon.Name,
Callback = function()
upgradeWeapon(weapon.Name)
end,
})
end
-- Create a button to upgrade all weapons 8 times
UpgradeWeaponsTab:CreateButton({
Name = "Upgrade All Weapons 8 Times",
Callback = function()
for _, weapon in pairs(weapons) do
for i = 1, 8 do
upgradeWeapon(weapon.Name)
end
end
end,
})
-- Button to purchase Cleansing Tea
ExtraTab:CreateButton({
Name = "Buy Cleansing Tea",
Callback = function()
local args = {
[1] = "Cleansing Tea"
}
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("Tea"):WaitForChild("PurchasingTea"):FireServer(unpack(args))
end,
})
-- Button to purchase Refreshing Tea
ExtraTab:CreateButton({
Name = "Buy Refreshing Tea",
Callback = function()
local args = {
[1] = "Refreshing Tea"
}
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("Tea"):WaitForChild("PurchasingTea"):FireServer(unpack(args))
end,
})
-- Button to purchase Healing Tea
ExtraTab:CreateButton({
Name = "Buy Healing Tea",
Callback = function()
local args = {
[1] = "Healing Tea"
}
game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("Tea"):WaitForChild("PurchasingTea"):FireServer(unpack(args))
end,
})