-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlowgfxloader.lua
96 lines (96 loc) · 4.12 KB
/
lowgfxloader.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
local Players = game:GetService("Players")
local BadInstances = {"DataModelMesh", "FaceInstance", "ParticleEmitter", "Trail", "Smoke", "Fire", "Sparkles", "PostEffect", "Explosion", "Clothing", "BasePart"}
local CanBeEnabled = {"ParticleEmitter", "Trail", "Smoke", "Fire", "Sparkles", "PostEffect"}
local function PartOfCharacter(Instance)
for i, v in pairs(Players:GetPlayers()) do
if v.Character and Instance:IsDescendantOf(v.Character) then
return true
end
end
return false
end
local function ReturnDescendants()
local Descendants = {}
WaitNumber = 5000
if _G.Settings.Players["Ignore Others"] then
for i, v in pairs(game:GetDescendants()) do
if not v:IsDescendantOf(Players) and not PartOfCharacter(v) then
for i2, v2 in pairs(BadInstances) do
if v:IsA(v2) then
table.insert(Descendants, v)
end
end
end
if i == WaitNumber then
task.wait()
WaitNumber = WaitNumber + 5000
end
end
elseif _G.Settings.Players["Ignore Me"] then
for i, v in pairs(game:GetDescendants()) do
if not v:IsDescendantOf(Players) and not v:IsDescendantOf(ME.Character) then
for i2, v2 in pairs(BadInstances) do
if v:IsA(v2) then
table.insert(Descendants, v)
end
end
end
if i == WaitNumber then
task.wait()
WaitNumber = WaitNumber + 5000
end
end
end
return Descendants
end
local function CheckIfBad(Instance)
if not Instance:IsDescendantOf(Players) and not PartOfCharacter(Instance) then
if Instance:IsA("DataModelMesh") then
if _G.Settings.Meshes.LowDetail then
sethiddenproperty(Instance, "LODX", Enum.LevelOfDetailSetting.Low)
sethiddenproperty(Instance, "LODY", Enum.LevelOfDetailSetting.Low)
elseif _G.Settings.Meshes.Destroy then
Instance:Destroy()
end
elseif Instance:IsA("FaceInstance") then
if _G.Settings.Images.Invisible then
Instance.Transparency = 1
elseif _G.Settings.Images.LowDetail then
Instance.Shiny = 1
elseif _G.Settings.Images.Destroy then
Instance:Destroy()
end
elseif table.find(CanBeEnabled, Instance.ClassName) then
if _G.Settings["No Particles"] or (_G.Settings.Other and _G.Settings.Other["No Particles"]) then
Instance.Enabled = false
end
elseif Instance:IsA("Explosion") then
if _G.Settings["No Explosions"] or (_G.Settings.Other and _G.Settings.Other["No Explosions"]) then
Instance.Visible = false
end
elseif Instance:IsA("Clothing") then
if _G.Settings["No Clothes"] or (_G.Settings.Other and _G.Settings.Other["No Clothes"]) then
Instance:Destroy()
end
elseif Instance:IsA("BasePart") then
if _G.Settings["Low Quality Parts"] or (_G.Settings.Other and _G.Settings.Other["Low Quality Parts"]) then
Instance.Material = Enum.Material.Plastic
Instance.Reflectance = 0
end
end
end
end
if _G.Settings["Low Water Graphics"] or (_G.Settings.Other and _G.Settings.Other["Low Water Graphics"]) then
workspace:FindFirstChildOfClass("Terrain").WaterWaveSize = 0
workspace:FindFirstChildOfClass("Terrain").WaterWaveSpeed = 0
workspace:FindFirstChildOfClass("Terrain").WaterReflectance = 0
workspace:FindFirstChildOfClass("Terrain").WaterTransparency = 0
end
if _G.Settings["No Shadows"] or (_G.Settings.Other and _G.Settings.Other["No Shadows"]) then
game:GetService("Lighting").GlobalShadows = false
game:GetService("Lighting").FogEnd = 9e9
end
if _G.Settings["Low Rendering"] or (_G.Settings.Other and _G.Settings.Other["Low Rendering"]) then
settings().Rendering.QualityLevel = 1
end
game.DescendantAdded:Connect(CheckIfBad)