BrianBoy_RB

BSS Anti Lag(Test Version)

Jan 23rd, 2022 (edited)
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. game:GetService("StarterGui"):SetCore("SendNotification", {
  2.         Title = "Loading Anti-lag...",
  3.         Text = "Executing Script..",
  4.         Icon = "rbxassetid://6238537240",
  5.         Duration = 5,
  6.     })
  7. task.wait(1.2)
  8. local _G = _G
  9. local RunService = game:GetService("RunService")
  10. local dt = os.clock()
  11. local noti = "Took %f seconds to load"
  12. local player = game.Players.LocalPlayer
  13. --local char = player.Character or player.CharacterAdded:Wait()
  14. local honeycomb = player:FindFirstChild("Honeycomb") or nil
  15. local hiveclaimed_time = honeycomb and os.clock() or 0
  16. local options = _G.settings
  17. local connections = {}
  18. --[[local prefix = ""
  19. local chat
  20. local speed = 28]]
  21. local l = game.Lighting
  22. local t = workspace.Terrain
  23. t.WaterWaveSize = 0
  24. t.WaterWaveSpeed = 0
  25. t.WaterReflectance = 0
  26. t.WaterTransparency = 0
  27. l.GlobalShadows = false
  28. l.FogEnd = 9e9
  29. --[[local ignore = {
  30.     ["Union"] =
  31.  
  32. }]]
  33.  
  34. settings().Rendering.QualityLevel = "Level01"
  35.  
  36. if connections then
  37.    for _,v in pairs(connections) do
  38.       v:Disconnect()  
  39.    end
  40. end
  41.  
  42. local function onPlayerAdded(p, meta)
  43.     if p == player and not meta then return end
  44.     warn(p.Name.." Joined")
  45.     connections.p = p.CharacterAdded:Connect(function(c)
  46.         task.wait(1)    
  47.             for _,v in pairs(c:GetDescendants()) do
  48.                 if v:IsA("BasePart") or v:IsA("Union") or v:IsA("TrussPart") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
  49.                     v.Material = "Plastic"
  50.                     v.Reflectance = 0
  51.                     v.CastShadow = false
  52.                     pcall(function()
  53.                          v.CanQuery = false
  54.                          if p ~= player then
  55.                             v.Transparency = (v:FindFirstAncestorWhichIsA("Accessory") or v:FindFirstAncestorWhichIsA("Tool")) and 1
  56.                             v.Enabled = false
  57.                         end
  58.                     end)
  59.                     if v:IsA("MeshPart") then
  60.                        v.TextureID = 10385902758728957
  61.                     end
  62.                 elseif v:IsA("ParticleEmitter") or v:IsA("Trail") or v:IsA("Beam") then
  63.                     v.Enabled = false
  64.                 elseif v:IsA("Decal") or v:IsA("Texture") then
  65.                     v:Destroy()
  66.                 elseif v:IsA("Fire") or v:IsA("Smoke") or v:IsA("Sparkles") then
  67.                     v.Enabled = false
  68.                 elseif v:IsA("SurfaceGui") and p ~= player then
  69.                    v.Active = false
  70.                    v.Enabled = false
  71.                 end
  72.         end
  73.     end)
  74. end
  75.  
  76. game.Players.PlayerAdded:Connect(onPlayerAdded)
  77.  
  78. onPlayerAdded(player, true)
  79.  
  80. for _, e in pairs(l:GetChildren()) do
  81.     pcall(function()
  82.         e.Enabled = false
  83.     end)
  84. end
  85.  
  86. for i, v in pairs(game:GetDescendants()) do
  87.     if v:IsA("BasePart") or v:IsA("Union") or v:IsA("TrussPart") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
  88.         v.Material = "Plastic"
  89.         v.Reflectance = 0
  90.         v.CastShadow = false
  91.         v.CanQuery = false
  92.             if v:IsA("MeshPart") and v.Name ~= "PlanterBulb" then
  93.                v.TextureID = 10385902758728957
  94.             end
  95.             if v.Name == "Part" and v:FindFirstAncestor("Decorations") then continue end
  96.             if v:FindFirstAncestor("Decorations") or v:FindFirstAncestor("Honeycombs") or v:FindFirstAncestor("Vicious Bee Claimer") then
  97.                v.Transparency = v.Parent ~= "TreatBooth" and 1 or 0
  98.                 if (v.Name ~= "Stump" and not v:FindFirstAncestor("StarAmuletBuilding") and not v:FindFirstAncestor("30BeeZone") and not v:FindFirstAncestor("Vicious Bee Claimer")) or (v.Name == "Star" or v.Name == "Wall" or v.Name == "Gate") then
  99.                     v.CanCollide = false
  100.                  end
  101.             elseif v.Name == "FieldDecos" or v:FindFirstAncestor("FieldDecos") or v.Name == "Rose" or v.Name == "Clover" or v.Name == "SpiderWeb" then
  102.                 v:Destroy()
  103.             elseif v:FindFirstAncestor("Shops") then
  104.                 v.Transparency = 1
  105.                 v.CanCollide = false
  106.             elseif v:FindFirstAncestor("Gates") and v.Name ~= "Frame" and v.Name ~= "Door" then
  107.                 v:Destroy()
  108.             end
  109.     elseif (v:IsA("Decal") or v:IsA("Texture") or v:IsA("SurfaceAppearance")) then
  110.         if (v:FindFirstAncestor("C") and options.token_decal) then continue end
  111.         v.Transparency = 1
  112.         pcall(function()
  113.             v.Enabled = false
  114.         end)
  115.             if v:FindFirstAncestor("Flowers") and not options.Flowers then
  116.                 v:Destroy()
  117.             end
  118.     elseif v:IsA("ParticleEmitter") or v:IsA("Trail") or v:IsA("Beam") then
  119.         v.Enabled = false
  120.     elseif v:IsA("Explosion") then
  121.         --v.BlastPressure = 1
  122.         --v.BlastRadius = 1
  123.         v:Destroy()
  124.     elseif v:IsA("Fire") or v:IsA("SpotLight") or v:IsA("Smoke") or v:IsA("Sparkles") then
  125.         v.Enabled = false
  126.     elseif v:IsA("SurfaceGui") and (v:FindFirstAncestor("Vicious Bee Claimer") or v:FindFirstAncestor("NPCs")) then
  127.           v.Active = false
  128.           v.Enabled = false
  129.     end
  130. end
  131.  
  132. if not honeycomb then
  133.     local z
  134.     z = player.ChildAdded:Connect(function(c)
  135.         if c.Name ~= "Honeycomb" then return end
  136.         honeycomb = c
  137.         hiveclaimed_time = os.clock()
  138.         z:Disconnect()
  139.     end)
  140. end
  141.  
  142. connections.a = game.Workspace.Bees.ChildAdded:Connect(function(c)
  143.         task.wait(1)
  144.         if os.clock() - hiveclaimed_time >= 2 or _G.beevisibility then
  145.             if c:IsA("BasePart") or c:IsA("Union") or c:IsA("TrussPart") or c:IsA("MeshPart") or c:IsA("UnionOperation") then
  146.                 c.Material = "Plastic"
  147.                 c.Reflectance = 0
  148.                 c.CastShadow = false
  149.                 c.Transparency = 1
  150.                 c.CanQuery = false
  151.                     if c:IsA("MeshPart") then
  152.                        c.TextureID = 10385902758728957
  153.                     end
  154.             end
  155.         end
  156.         for _,v in pairs(c:GetDescendants()) do
  157.             if v:IsA("BasePart") or v:IsA("Union") or v:IsA("TrussPart") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
  158.                 v.Material = "Plastic"
  159.                 v.Reflectance = 0
  160.                 v.CastShadow = false
  161.                 v.Transparency = 1
  162.                 v.CanQuery = false
  163.                     if v:IsA("MeshPart") then
  164.                        v.TextureID = 10385902758728957
  165.                     end
  166.             elseif v:IsA("ParticleEmitter") or v:IsA("Trail") or v:IsA("Beam") then
  167.                 v.Enabled = false
  168.             elseif v:IsA("Decal") or v:IsA("Texture") then
  169.                 v:Destroy()
  170.                 --[[pcall(function()
  171.                     v.Enabled = false
  172.                 end)]]
  173.             elseif v:IsA("Fire") or v:IsA("Smoke") or v:IsA("Sparkles") then
  174.                 v.Enabled = false
  175.             end
  176.             RunService.RenderStepped:Wait()
  177.         end
  178. end)
  179.  
  180. connections.b = game.Workspace.Honeycombs.DescendantAdded:Connect(function(v)
  181.     if v:IsA("BasePart") or v:IsA("Union") or v:IsA("TrussPart") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
  182.                 v.Material = "Plastic"
  183.                 v.Reflectance = 0
  184.                 v.Transparency = 1
  185.                 v.CastShadow = false
  186.                 v.CanQuery = false
  187.      elseif v:IsA("Decal") or v:IsA("Texture") or v:IsA("SurfaceAppearance") then
  188.                 v.Transparency = 1
  189.                 pcall(function()
  190.                     v.Enabled = false
  191.                 end)
  192.      end
  193. end)
  194.  
  195. connections.c = game.Workspace.Balloons.FieldBalloons.DescendantAdded:Connect(function(v)
  196.      if v:IsA("BasePart") or v:IsA("Union") or v:IsA("TrussPart") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
  197.                 v.Material = "Plastic"
  198.                 v.Reflectance = 0
  199.                 v.CastShadow = false
  200.                 v.Transparency = options.BalloonTransparency or v.Transparency
  201.                     if v:IsA("MeshPart") then
  202.                        v.TextureID = 10385902758728957
  203.                     end
  204.             elseif v:IsA("ParticleEmitter") or v:IsA("Trail") or v:IsA("Beam") then
  205.                         v.Enabled = false
  206.             elseif v:IsA("Decal") or v:IsA("Texture") then
  207.                 v.Transparency = 1
  208.                 pcall(function()
  209.                     v.Enabled = false
  210.                 end)
  211.       end
  212. end)
  213.  
  214. connections.d = game.Workspace.Gadgets.DescendantAdded:Connect(function(v)
  215.             if v:IsA("BasePart") or v:IsA("Union") or v:IsA("TrussPart") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
  216.                 v.Material = "Plastic"
  217.                 v.Reflectance = 0
  218.                 v.CastShadow = false
  219.                     if v:IsA("MeshPart") then
  220.                        v.TextureID = 10385902758728957
  221.                     end
  222.             elseif v:IsA("ParticleEmitter") or v:IsA("Trail") or v:IsA("Beam") then
  223.                 v.Enabled = false
  224.             elseif v:IsA("Decal") or v:IsA("Texture") then
  225.                 v:Destroy()
  226.             end
  227. end)
  228.  
  229. if not options.Frogs then
  230.     connections.e = game.Workspace.Frogs.DescendantAdded:Connect(function(v)
  231.         print(v:GetFullName().."\n -"..v.ClassName)
  232.         if v:IsA("BasePart") or v:IsA("Union") or v:IsA("TrussPart") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
  233.                     --[[v.Material = "Plastic"
  234.                     v.Reflectance = 0
  235.                     v.CastShadow = false
  236.                         if v:IsA("MeshPart") then
  237.                            v.TextureID = 10385902758728957
  238.                         end]]
  239.                 v:Destroy()
  240.                 elseif v:IsA("ParticleEmitter") or v:IsA("Trail") or v:IsA("Beam") then
  241.                     v.Enabled = false
  242.                 elseif v:IsA("Decal") or v:IsA("Texture") then
  243.                     v:Destroy()
  244.                 end
  245.     end)
  246. end
  247.  
  248. local deco = game.Workspace.Decorations
  249.  
  250. for _,v in pairs(deco:GetDescendants()) do
  251.    if v.Name == "TreatBooth" then
  252.     for _,c in pairs (v:GetChildren()) do
  253.         c.CanCollide = true
  254.         c.Transparency = v.Name ~= "Canopy" and 0 or 1
  255.        end
  256.     end
  257. end
  258.  
  259. if not options.NPCs then
  260.     for _, v in pairs(workspace.NPCs:GetDescendants()) do
  261.             if v:IsA("BasePart") or v:IsA("Union") or v:IsA("TrussPart") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
  262.                 v.Material = "Plastic"
  263.                 v.Reflectance = 0
  264.                 v.CastShadow = false
  265.                 v.Transparency = 1
  266.                 v.CanQuery = false
  267.                     if v:IsA("MeshPart") then
  268.                        v.TextureID = 10385902758728957
  269.                        v.CanCollide = false
  270.                     end
  271.             elseif v:IsA("ParticleEmitter") or v:IsA("Trail") or v:IsA("Beam") then
  272.                 v.Enabled = false
  273.             elseif v:IsA("Decal") or v:IsA("Texture") then
  274.                 v:Destroy()
  275.                 pcall(function()
  276.                     v.Enabled = false
  277.                 end)
  278.             elseif v:IsA("Fire") or v:IsA("Smoke") or v:IsA("Sparkles") then
  279.                 v.Enabled = false
  280.             end
  281.     end
  282. end
  283.  
  284. if options.low_beedetail then
  285.     for _, c in pairs(workspace.Bees:GetChildren()) do
  286.         if not honeycomb then
  287.             c.Transparency = 1
  288.         end
  289.         for _,v in pairs(c:GetDescendants()) do
  290.             if v:IsA("BasePart") or v:IsA("Union") or v:IsA("TrussPart") or v:IsA("MeshPart") or v:IsA("UnionOperation") then
  291.                 v.Material = "Plastic"
  292.                 v.Reflectance = 0
  293.                 v.CastShadow = false
  294.                 v.Transparency = 1
  295.                 v.CanQuery = false
  296.                     if v:IsA("MeshPart") then
  297.                        v.TextureID = 10385902758728957
  298.                     end
  299.             elseif v:IsA("ParticleEmitter") or v:IsA("Trail") or v:IsA("Beam") then
  300.                 v.Enabled = false
  301.             elseif v:IsA("Decal") or v:IsA("Texture") then
  302.                 v:Destroy()
  303.             elseif v:IsA("Fire") or v:IsA("Smoke") or v:IsA("Sparkles") then
  304.                 v.Enabled = false
  305.             end
  306.         end
  307.     end
  308. end
  309.  
  310. if options.no_path then
  311.     for _, v in pairs(workspace.Paths:GetChildren()) do
  312.         v:Destroy()
  313.     end
  314. end
  315.  
  316. if not options.leaderboard then
  317.     for _,v in pairs(workspace.Leaderboards:GetDescendants()) do
  318.         if v:IsA("SurfaceGui") then
  319.            v.Active = false
  320.            v.Enabled = false
  321.         end
  322.     end
  323. end
  324.  
  325. --local d = game.Workspace.Collectibles.ChildAdded
  326. --[[game.Workspace.DescendantAdded:Connect(function(v)
  327.     if v:IsA("ParticleEmitter") or v:IsA("Trail") or v:IsA("Beam") then
  328.         v.Enabled = false
  329.     elseif v:IsA("Decal") or v:IsA("Texture") and decalsyeeted then
  330.         v.Transparency = 1
  331.     elseif v:IsA("Fire") or v:IsA("Smoke") or v:IsA("Sparkles") then
  332.         v.Enabled = false
  333.     elseif v:IsA("MeshPart") or v:IsA("UnionOperation") then
  334.         v.Material = "Plastic"
  335.         v.Reflectance = 0
  336.     end
  337. end)]]
  338.  
  339. local time1 =  os.clock()-dt-0.5
  340. time1 = string.gsub(time1, "[%p]0+$", "")
  341. time1 = string.format("Took %f seconds to load", time1)
  342.  
  343. game:GetService("StarterGui"):SetCore("SendNotification", {
  344.         Title = "Anti-lag Loaded",
  345.         Text = time1,
  346.         Icon = "rbxassetid://6238537240",
  347.         Duration = 5,
  348.     })
  349.  
  350. --local delta, noti
  351.  
  352. --[[while true do
  353.     task.wait(5*60)
  354.     local last = os.clock()
  355.     game:GetService("StarterGui"):SetCore("SendNotification", {
  356.             Title = "Notification",
  357.             Text = "Clearning Flowers...",
  358.             Icon = "rbxassetid://6238537240",
  359.             Duration = 3,
  360.         })
  361.     for _,v in pairs(workspace.Flowers:GetDescendants()) do
  362.         if v:IsA("Decal") or v:IsA("Texture") or v:IsA("SurfaceAppearance") then
  363.             v.Transparency = 1
  364.         end
  365.         RunService.RenderStepped:Wait()
  366.     end
  367.  
  368.     delta = os.clock()-last
  369.     delta = string.gsub(delta, "[%p]0+$", "")
  370.     noti = string.format("Took %f to clean flowers" , delta)
  371.     game:GetService("StarterGui"):SetCore("SendNotification", {
  372.             Title = "Cleaning Flowers",
  373.             Text = noti,
  374.             Icon = "rbxassetid://6238537240",
  375.             Duration = 3,
  376.         })
  377. end]]
Add Comment
Please, Sign In to add comment