-
Notifications
You must be signed in to change notification settings - Fork 0
/
bettr.lua
236 lines (230 loc) · 8.07 KB
/
bettr.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
setscriptable(game:GetService("Workspace"), "SignalBehavior", true) --cause sethiddenprop is shit and errors for some reason
setscriptable(game:GetService("Workspace"), "InterpolationThrottling", true)
setscriptable(game:GetService("Workspace"), "ClientAnimatorThrottling", true)
setscriptable(game:GetService("Workspace"), "MeshPartHeadsAndAccessories", true)
setscriptable(game:GetService("Workspace"), "PhysicsSteppingMethod", true)
setscriptable(game:GetService("Workspace").Terrain, "WaterTransparency", true)
setscriptable(game:GetService("Workspace").Terrain, "Decoration", true)
setscriptable(game:GetService("Lighting"), "Technology", true)
setscriptable(game:GetService("Lighting"), "EnvironmentDiffuseScale", true)
setscriptable(game:GetService("Lighting"), "EnvironmentSpecularScale", true)
setscriptable(game:GetService("Lighting"), "GlobalShadows", true)
setscriptable(game:GetService("Workspace"), "LevelOfDetail", true)
game:GetService("Workspace").LevelOfDetail = Enum.ModelLevelOfDetail.Disabled
settings().Rendering.QualityLevel = "Level01"
game:GetService("Lighting").GlobalShadows = false
game:GetService("Lighting").FogEnd = 9e9
game:GetService("Lighting").Brightness = 0
game:GetService("Workspace").Terrain.WaterWaveSize = 0
game:GetService("Workspace").Terrain.WaterWaveSpeed = 0
game:GetService("Workspace").Terrain.WaterReflectance = 0
game:GetService("Workspace").Terrain.WaterTransparency = 0
for _,v in pairs(game:GetService("Lighting"):GetChildren()) do
if v:IsA("BlurEffect") or v:IsA("BloomEffect") or v:IsA("SunRaysEffect") and v.Name ~= "" then
v.Enabled = false
end
end
for i,e in pairs(game:GetService("Lighting"):GetChildren()) do
if e:IsA("BlurEffect") or e:IsA("SunRaysEffect") or e:IsA("ColorCorrectionEffect") or e:IsA("BloomEffect") or e:IsA("DepthOfFieldEffect") then
e.Enabled = false
end
end
local table_insert
do -- Globals
table_insert = table.insert
end
local _gethiddenproperty
local _sethiddenproperty
do -- Implementations
_gethiddenproperty =
gethiddenproperty or gethiddenprop or get_hidden_property or get_hidden_prop or getpropvalue or
function(_Instance, _string, ...)
local v_boolean_indexSucceeded, v_any_propValue =
pcall(
function()
return _Instance[_string]
end
)
return v_boolean_indexSucceeded and v_any_propValue
end
_sethiddenproperty =
sethiddenproperty or sethiddenprop or set_hidden_property or set_hidden_prop or setpropvalue or
function(_Instance, _string, _any, ...)
local v_boolean_newIndexSucceeded, v_string_error =
pcall(
function()
_Instance[_string] = _any
end
)
if not v_boolean_newIndexSucceeded then
local v_number_stackLevel = 2
error(v_string_error, v_number_stackLevel)
end
end
end
local GetService
local GetDescendants
local IsA
do -- Methods
GetService = game.GetService
GetDescendants = game.GetDescendants
IsA = game.IsA
end
local Lighting
local NetworkSettings, RenderSettings, GameSettings
local UserGameSettings
do -- Services
Lighting = GetService(game, "Lighting")
NetworkSettings, RenderSettings, GameSettings =
(function(...)
local v_Instance_globalSettings = settings(...)
return GetService(v_Instance_globalSettings, "NetworkSettings"), GetService(
v_Instance_globalSettings,
"RenderSettings"
), GetService(v_Instance_globalSettings, "GameSettings")
end)()
UserGameSettings = GetService(UserSettings(...), "UserGameSettings")
end
local Properties
do -- Locals
Properties = {
QualityLevel = {
RenderSettings,
Enum.QualityLevel.Level01
},
MeshPartDetailLevel = {
RenderSettings,
Enum.MeshPartDetailLevel.Level01
},
EagerBulkExecution = {
RenderSettings,
false
}, -- Rendering budget limit
SavedQualityLevel = {
UserGameSettings,
Enum.SavedQualitySetting.QualityLevel1
},
Technology = {
Lighting,
Enum.Technology.Legacy
},
EnvironmentDiffuseScale = {
Lighting,
0
},
EnvironmentSpecularScale = {
Lighting,
0
},
PhysicsSteppingMethod = {
workspace,
Enum.PhysicsSteppingMethod.Default
},
SignalBehavior = {
workspace,
Enum.SignalBehavior.Deferred
},
MeshPartHeadsAndAccessories = {
workspace,
Enum.MeshPartHeadsAndAccessories.Enabled
},
ClientAnimatorThrottling = {
workspace,
Enum.ClientAnimatorThrottlingMode.Enabled
},
InterpolationThrottling = {
workspace,
Enum.InterpolationThrottlingMode.Enabled
},
GlobalShadows = {
Lighting,
false
}, -- Shadows on
Decoration = {
workspace.Terrain,
false
}, -- Grass on
WaterTransparency = {
workspace.Terrain,
0
}, -- Transparent water
IncomingReplicationLag = {
NetworkSettings,
-1000
}, -- lagn't
HasEverUsedVR = {
UserGameSettings,
false
} -- funni
}
end
local EnumItem_ModelLevelOfDetail_Disabled
do -- EnumItems
EnumItem_ModelLevelOfDetail_Disabled = Enum.ModelLevelOfDetail.Disabled
end
do -- Source
do -- Change Properties
for v_string_propName, v_table_propData in next, Properties do
local v_Instance_propHolder = v_table_propData[1]
local v_any_propValue = v_table_propData[2]
_sethiddenproperty(v_Instance_propHolder, v_string_propName, v_any_propValue)
end
end
do -- MeshParts with their DoubleSided property
local v_table_meshParts = (function(...)
local v_table_meshParts = {}
for v_number_index, v_Instance_instance in ipairs(GetDescendants(game)) do
if
IsA(v_Instance_instance, "MeshPart") and
_gethiddenproperty(v_Instance_instance, "DoubleSided") == true
then
table_insert(v_table_meshParts, v_Instance_instance)
end
end
return v_table_meshParts
end)()
for v_number_index, v_MeshPart_instance in ipairs(v_table_meshParts) do
_sethiddenproperty(v_MeshPart_instance, "DoubleSided", false)
end
end
do -- Models with their LevelOfDetail property
local v_table_models =
(function(...)
local v_table_models = {}
for v_number_index, v_Instance_instance in ipairs(GetDescendants(game)) do
if
IsA(v_Instance_instance, "Model") and
_gethiddenproperty(v_Instance_instance, "LevelOfDetail") ~= EnumItem_ModelLevelOfDetail_Disabled
then
table_insert(v_table_models, v_Instance_instance)
end
end
return v_table_models
end)()
for v_number_index, v_Model_instance in ipairs(v_table_models) do
_sethiddenproperty(v_Model_instance, "LevelOfDetail", EnumItem_ModelLevelOfDetail_Disabled)
end
end
end
local Zero = NumberRange.new(0)
local function BoostFPS(x)
for _, v in ipairs(x:GetDescendants()) do
if v:IsA("BasePart") then
v.Reflectance, v.CastShadow = 0, false
end
if v:IsA("Humanoid") then
v.CastShadow = false
end
if v:IsA("PostEffect") then
v.Enabled = false
end
if v:IsA("ParticleEmitter") or v:IsA("Trail") then
v.LightTime = Zero
end
if v:IsA("Explosion") then
v.BlastPressure, v.BlastRadius = 1, 1
end
end
end
BoostFPS(workspace)
BoostFPS(game:GetService("Lighting"))