Repository navigation
Expand file tree
/
Copy pathLobby.lua
More file actions
130 lines (113 loc) · 4.44 KB
/
Copy pathLobby.lua
File metadata and controls
130 lines (113 loc) · 4.44 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
local Rayfield = loadstring(game:HttpGet('https://sirius.menu/rayfield'))()
-- Create a Window
local Window = Rayfield:CreateWindow({
Name = "Lobby by Zgladius",
LoadingTitle = "Loading Lobby Gui by Zgladius...",
ConfigurationSaving = {
Enabled = true,
FolderName = "SanityConfig",
FileName = "SanitySettings"
}
})
--Sanity controlz tab
local SanityTab = Window:CreateTab("Sanity Control")
local Label = SanityTab:CreateLabel("Made By Zgladius")
SanityTab:CreateInput({
Name = "Add Custom Sanity",
PlaceholderText = "Enter amount of sanity",
RemoveTextAfterFocusLost = false,
Callback = function(Text)
local amount = tonumber(Text)
if amount then
game:GetService("ReplicatedStorage").BuyTheme:InvokeServer(-amount, "Luxury")
print("Added " .. amount .. " Sanity.")
else
print("Invalid input. Please enter a number.")
end
end,
})
--remove all sanity
SanityTab:CreateButton({
Name = "Remove All Sanity Points",
Callback = function()
local sanityPoints = game:GetService("Players").LocalPlayer.leaderstats["Sanity Points"].Value
game:GetService("ReplicatedStorage").BuyTheme:InvokeServer(sanityPoints, "Luxury")
print("Removed " .. sanityPoints .. " Sanity Points.")
end,
})
--bunker list
local bunkers = {
"Aquarium", "Artificial Happiness","Alien", "Asylum", "BBQ", "Birthday Party",
"Christmas", "Cozy Cabin", "Dollhouse", "Fallout", "Halloween",
"Japan", "Lab", "Luxury", "Overgrown", "Raiders",
"Realistic Basement", "Space", "Survivor", "Void"
}
-- Add a button to buy all bunkers for 0 sanity points
SanityTab:CreateButton({
Name = "Buy All Bunkers for 0 Sanity",
Callback = function()
for _, bunker in ipairs(bunkers) do
game:GetService("ReplicatedStorage").BuyTheme:InvokeServer(0, bunker)
print("Purchased bunker: " .. bunker .. " for 0 Sanity Points.")
end
end,
})
SanityTab:CreateButton({
Name = "Delete Duplicate Bunker Themes",
Callback = function()
local bunkerThemes = game:GetService("Players").LocalPlayer:WaitForChild("BunkerThemes"):GetChildren()
local seenThemes = {}
for _, theme in pairs(bunkerThemes) do
if not seenThemes[theme.Name] then
seenThemes[theme.Name] = true -- Mark theme as seen
else
theme:Destroy() -- Destroy duplicate theme
print("Deleted duplicate theme: " .. theme.Name)
end
end
print("Completed deletion of duplicate bunker themes.")
end,
})
-- Button to first clear sanity to zero, then add 7 sanity every 0.00001 seconds
SanityTab:CreateButton({
Name = "Reset Sanity and Add 7 Every 0.00001 Seconds",
Callback = function()
-- Remove all sanity points
local sanityPoints = game:GetService("Players").LocalPlayer.leaderstats["Sanity Points"].Value
game:GetService("ReplicatedStorage").BuyTheme:InvokeServer(sanityPoints, "Luxury")
print("Removed " .. sanityPoints .. " Sanity Points.")
-- Start adding 7 sanity every 0.00001 seconds
spawn(function()
while true do
game:GetService("ReplicatedStorage").BuyTheme:InvokeServer(-957, "Luxury")
end
end)
end,
})
-- Create a new tab for the lobbies
local LobbiesTab = Window:CreateTab("Available Lobbies")
-- Get the ScrollingFrame and its children
local scrollingFrame = game:GetService("Players").LocalPlayer.PlayerGui.AvailableLobbies.Background.ScrollingFrame
local children = scrollingFrame:GetChildren()
-- Iterate through each child to create a toggle (excluding UI elements)
for _, child in pairs(children) do
if child:IsA("GuiObject") then
LobbiesTab:CreateToggle({
Name = child.Name,
CurrentValue = false,
Callback = function(Value)
if Value then
spawn(function()
while Value do
wait(0.05)
local args = {
[1] = game:GetService("ReplicatedStorage"):WaitForChild("Lobbies"):WaitForChild(child.Name)
}
game:GetService("ReplicatedStorage"):WaitForChild("JoiningLobby"):InvokeServer(unpack(args))
end
end)
end
end,
})
end
end