R

Fps kap fpsboosr

public
rrixh Jul 24, 2024 Never 27
Clone
Lua Fpsboost_rrixh 99 lines (84 loc) | 3.15 KB
1
-- kreds- guesttester_1
2
--remove textures
3
setfpscap(900) -- normal fps cap for other executors
4
5
setfflag("TaskSchedulerTargetFps", "900") -- for setfpscap unc missing or unsupported for executors
6
7
local function removeWater()
8
for _, obj in pairs(workspace:GetDescendants()) do
9
if obj:IsA("Terrain") then
10
obj.WaterTransparency = 1
11
obj.WaterWaveSize = 0
12
obj.WaterWaveSpeed = 0
13
obj.WaterReflectance = 0
14
end
15
end
16
end
17
18
local function removeReflections()
19
local lighting = game:GetService("Lighting")
20
lighting.EnvironmentSpecularScale = 0
21
lighting.EnvironmentDiffuseScale = 0
22
end
23
24
local function reduceGrassDetail()
25
for _, obj in pairs(workspace:GetDescendants()) do
26
if obj:IsA("Terrain") then
27
obj:SetMaterialColor(Enum.Material.Grass, Color3.fromRGB(34, 139, 34)) -- Set to a less bright green
28
obj:SetMaterialProperty(Enum.Material.Grass, "Transparency", 1) -- Increase transparency
29
obj:SetMaterialProperty(Enum.Material.Grass, "Reflectance", 0) -- Remove reflectance
30
end
31
end
32
end
33
34
local function removeEffects()
35
for _, effect in pairs(workspace:GetDescendants()) do
36
if effect:IsA("ParticleEmitter") or effect:IsA("Smoke") or effect:IsA("Fire") or effect:IsA("Sparkles") then
37
effect.Enabled = false
38
end
39
end
40
end
41
42
local function removeExplosions()
43
for _, explosion in pairs(workspace:GetDescendants()) do
44
if explosion:IsA("Explosion") then
45
explosion:Destroy()
46
end
47
end
48
end
49
50
local function setLowShadows()
51
game.Lighting.GlobalShadows = false
52
end
53
54
local function setLowQuality()
55
settings().Rendering.QualityLevel = Enum.QualityLevel.Level01
56
end
57
58
local function setLowRenderDistance()
59
game:GetService("Workspace").CurrentCamera.MaxZoomDistance = 50
60
game:GetService("Workspace").CurrentCamera.FieldOfView = 70
61
end
62
63
local function setLowGraphics()
64
local Lighting = game:FindService("Lighting")
65
66
setscriptable(Lighting, "Technology", true)
67
Lighting.Technology = Enum.Technology.Legacy
68
69
for _, v in next, workspace:GetDescendants() do
70
if v:IsA("PointLight") or v:IsA("SpotLighting") or v:IsA("SurfaceLight") then
71
local Light = v
72
if not Light.Shadows then
73
Light.Shadows = true
74
end
75
end
76
end
77
end
78
79
local function reduceLag()
80
removeWater()
81
removeReflections()
82
reduceGrassDetail()
83
removeEffects()
84
removeExplosions()
85
setLowShadows()
86
setLowQuality()
87
setLowRenderDistance()
88
setLowGraphics()
89
end
90
91
reduceLag()
92
93
workspace.DescendantAdded:Connect(function(descendant)
94
if descendant:IsA("Terrain") or descendant:IsA("ParticleEmitter") or descendant:IsA("Smoke") or descendant:IsA("Fire") or descendant:IsA("Sparkles") or descendant:IsA("Explosion") then
95
reduceLag()
96
end
97
end);
98
local Game = game:GetService("MarketplaceService"):GetProductInfo(game.PlaceId).Name;
99
game:GetService("StarterGui"):SetCore("SendNotification", {Title = Game, Duration = 3, Button1 = "prexiate it👺", Callback = function() end, Text = "Boosted FPS"});