-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMXUeMyEB2dcNLMDphMRDtHNvWr0NZyKMLUdViPZiDaCnYTDSSimpleOptimize.lua
68 lines (68 loc) · 2.11 KB
/
MXUeMyEB2dcNLMDphMRDtHNvWr0NZyKMLUdViPZiDaCnYTDSSimpleOptimize.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
repeat task.wait() until game:IsLoaded()
print("made by devix7", "github.com/devix7")
local Lighting = game:GetService("Lighting")
local function delLight()
for _, lightobj in pairs(Lighting:GetDescendants()) do
lightobj:Destroy()
end
end
local function fullbright()
Lighting.Brightness = 2
Lighting.ClockTime = 14
Lighting.FogEnd = 100000
Lighting.GlobalShadows = false
Lighting.OutdoorAmbient = Color3.fromRGB(128, 128, 128)
end
if game.PlaceId == 5591597781 then
repeat
local map = game:GetService("ReplicatedStorage").State.Map
task.wait()
until map and map ~= ""
task.wait(.5)
repeat
task.wait()
until game:GetService("Workspace"):FindFirstChild("Map")
game:GetService("Workspace"):FindFirstChild("Map"):Destroy()
delLight()
fullbright()
elseif game.PlaceId == 3260590327 then
local keepObjectNames = {"Center2", "Type", "SpawnLocation", "Elevators", "Terrain", "Camera"}
local function allKeepObjectsExist()
for _, objName in ipairs(keepObjectNames) do
if not game:GetService("Workspace"):FindFirstChild(objName) then
return false
end
end
if not game:GetService("Players").LocalPlayer.Character then
return false
end
return true
end
repeat
task.wait()
until allKeepObjectsExist()
local keepObjects = {
game:GetService("Workspace").Center2,
game:GetService("Workspace").Type,
game:GetService("Workspace").SpawnLocation,
game:GetService("Workspace").Elevators,
game:GetService("Workspace").Terrain,
game:GetService("Workspace").Camera,
game:GetService("Players").LocalPlayer.Character
}
local function shouldKeep(obj)
for _, keepObj in ipairs(keepObjects) do
if obj == keepObj then
return true
end
end
return false
end
for _, obj in ipairs(game:GetService("Workspace"):GetChildren()) do
if not shouldKeep(obj) then
obj:Destroy()
end
end
delLight()
fullbright()
end