Rojhann10

Untitled

Aug 31st, 2025
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.60 KB | None | 0 0
  1. --// SERVICES
  2. local Players = game:GetService("Players")
  3. local RunService = game:GetService("RunService")
  4. local Lighting = game:GetService("Lighting")
  5. local VirtualUser = game:GetService("VirtualUser")
  6. local player = Players.LocalPlayer
  7. local playerGui = player:WaitForChild("PlayerGui")
  8.  
  9. --// REMOVE OLD GUI
  10. local oldGui = playerGui:FindFirstChild("CustomUI")
  11. if oldGui then
  12. oldGui:Destroy()
  13. end
  14.  
  15. --// SAVE ORIGINAL LIGHTING SETTINGS
  16. local originalLighting = {
  17. FogStart = Lighting.FogStart,
  18. FogEnd = Lighting.FogEnd,
  19. GlobalShadows = Lighting.GlobalShadows,
  20. Brightness = Lighting.Brightness,
  21. ClockTime = Lighting.ClockTime,
  22. EnvironmentDiffuseScale = Lighting.EnvironmentDiffuseScale,
  23. EnvironmentSpecularScale = Lighting.EnvironmentSpecularScale,
  24. OutdoorAmbient = Lighting.OutdoorAmbient
  25. }
  26.  
  27. --// GUI SETUP
  28. local screenGui = Instance.new("ScreenGui")
  29. screenGui.Name = "CustomUI"
  30. screenGui.ResetOnSpawn = false
  31. screenGui.Parent = playerGui
  32.  
  33. local mainFrame = Instance.new("Frame")
  34. mainFrame.Name = "BlackFrame"
  35. mainFrame.Size = UDim2.new(0, 300, 0, 150)
  36. mainFrame.Position = UDim2.new(0.5, -150, 0.5, -75)
  37. mainFrame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  38. mainFrame.BackgroundTransparency = 0.3
  39. mainFrame.BorderSizePixel = 0
  40. mainFrame.Active = true
  41. mainFrame.Draggable = true
  42. mainFrame.Parent = screenGui
  43.  
  44. --// ROUNDING
  45. local corner = Instance.new("UICorner")
  46. corner.CornerRadius = UDim.new(0, 12)
  47. corner.Parent = mainFrame
  48.  
  49. --// TITLE
  50. local title = Instance.new("TextLabel")
  51. title.Name = "Title"
  52. title.Size = UDim2.new(1, 0, 0, 30)
  53. title.Position = UDim2.new(0, 0, 0, 0)
  54. title.BackgroundTransparency = 1
  55. title.Text = "FPS Booster made By: Rojhann"
  56. title.TextColor3 = Color3.fromRGB(0, 255, 0)
  57. title.TextScaled = true
  58. title.Font = Enum.Font.GothamBold
  59. title.Parent = mainFrame
  60.  
  61. --// BUTTON
  62. local fpsButton = Instance.new("TextButton")
  63. fpsButton.Name = "FPSButton"
  64. fpsButton.Size = UDim2.new(0.8, 0, 0, 40)
  65. fpsButton.Position = UDim2.new(0.1, 0, 0, 40)
  66. fpsButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  67. fpsButton.BackgroundTransparency = 0.3
  68. fpsButton.Text = "FPS On"
  69. fpsButton.TextScaled = true
  70. fpsButton.Font = Enum.Font.GothamBold
  71. fpsButton.TextColor3 = Color3.fromRGB(0, 255, 0)
  72. fpsButton.Parent = mainFrame
  73.  
  74. local buttonCorner = Instance.new("UICorner")
  75. buttonCorner.CornerRadius = UDim.new(0, 12)
  76. buttonCorner.Parent = fpsButton
  77.  
  78. --// COLOR ANIMATION
  79. local greenColors = {
  80. Color3.fromRGB(0, 255, 0),
  81. Color3.fromRGB(0, 200, 0),
  82. Color3.fromRGB(0, 150, 0),
  83. Color3.fromRGB(100, 255, 100),
  84. Color3.fromRGB(0, 128, 0)
  85. }
  86. task.spawn(function()
  87. local index = 1
  88. while true do
  89. local color = greenColors[index]
  90. title.TextColor3 = color
  91. fpsButton.TextColor3 = color
  92. index += 1
  93. if index > #greenColors then index = 1 end
  94. task.wait(1)
  95. end
  96. end)
  97.  
  98. --// BOOST TOGGLES
  99. local fpsEnabled = false
  100. local afkConnection = nil
  101. local disconnectLoop = nil
  102.  
  103. local function enableBoost()
  104. -- MAX FPS
  105. pcall(function()
  106. if setfpscap then setfpscap(10000) end
  107. if setfpscapinternal then setfpscapinternal(10000) end
  108. end)
  109.  
  110. -- ANTI-AFK
  111. afkConnection = player.Idled:Connect(function()
  112. VirtualUser:Button2Down(Vector2.new(0,0), workspace.CurrentCamera.CFrame)
  113. wait(1)
  114. VirtualUser:Button2Up(Vector2.new(0,0), workspace.CurrentCamera.CFrame)
  115. end)
  116.  
  117. -- ANTI-KICK LOOP
  118. disconnectLoop = task.spawn(function()
  119. while fpsEnabled do
  120. wait(10)
  121. -- dummy loop to simulate activity
  122. end
  123. end)
  124.  
  125. -- REMOVE FOG
  126. Lighting.FogEnd = 1e10
  127. Lighting.FogStart = 1e10
  128.  
  129. -- DISABLE PARTICLES & EFFECTS
  130. for _, v in pairs(workspace:GetDescendants()) do
  131. if v:IsA("ParticleEmitter") or v:IsA("Trail") or v:IsA("Smoke") or v:IsA("Fire") or v:IsA("Sparkles") then
  132. v.Enabled = false
  133. end
  134. end
  135. end
  136.  
  137. local function disableBoost()
  138. -- RESET FPS
  139. pcall(function()
  140. if setfpscap then setfpscap(60) end
  141. end)
  142.  
  143. -- DISCONNECT ANTI-AFK
  144. if afkConnection then
  145. afkConnection:Disconnect()
  146. afkConnection = nil
  147. end
  148. if disconnectLoop then
  149. task.cancel(disconnectLoop)
  150. disconnectLoop = nil
  151. end
  152.  
  153. -- RESTORE FOG
  154. Lighting.FogStart = originalLighting.FogStart
  155. Lighting.FogEnd = originalLighting.FogEnd
  156.  
  157. -- RESTORE EFFECTS
  158. for _, v in pairs(workspace:GetDescendants()) do
  159. if v:IsA("ParticleEmitter") or v:IsA("Trail") or v:IsA("Smoke") or v:IsA("Fire") or v:IsA("Sparkles") then
  160. v.Enabled = true
  161. end
  162. end
  163. end
  164.  
  165. --// BUTTON FUNCTION
  166. fpsButton.MouseButton1Click:Connect(function()
  167. fpsEnabled = not fpsEnabled
  168. if fpsEnabled then
  169. fpsButton.Text = "FPS Off"
  170. enableBoost()
  171. else
  172. fpsButton.Text = "FPS On"
  173. disableBoost()
  174. end
  175. end)
Advertisement
Add Comment
Please, Sign In to add comment