local UIS = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local isOptimized = false local originalData = {} -- 1. Create the UI local sg = Instance.new("ScreenGui", game:GetService("CoreGui")) sg.Name = "FPS_Optimizer_V2" local btn = Instance.new("TextButton", sg) btn.Name = "ToggleButton" btn.Size = UDim2.new(0, 110, 0, 50) -- Adjusted width for "Fps Booster" btn.Position = UDim2.new(0, 10, 0.5, -25) btn.BackgroundColor3 = Color3.fromRGB(40, 40, 40) btn.Text = "Fps Booster" btn.TextColor3 = Color3.new(1, 1, 1) btn.Font = Enum.Font.SourceSansBold btn.TextSize = 16 local corner = Instance.new("UICorner", btn) corner.CornerRadius = UDim.new(0, 12) -- 2. PC Notification Logic if UIS.KeyboardEnabled then local tip = Instance.new("TextLabel", sg) tip.Size = UDim2.new(0, 150, 0, 30) tip.Position = UDim2.new(0, 130, 0.5, -15) -- Shifted right to account for wider button tip.BackgroundTransparency = 1 tip.Text = "Press [Left Ctrl] to Toggle" tip.TextColor3 = Color3.new(1, 1, 1) tip.TextStrokeTransparency = 0.5 tip.Font = Enum.Font.SourceSansItalic tip.TextSize = 14 tip.TextXAlignment = Enum.TextXAlignment.Left -- Fade out after 5 seconds task.delay(5, function() local tween = TweenService:Create(tip, TweenInfo.new(1), {TextTransparency = 1, TextStrokeTransparency = 1}) tween:Play() tween.Completed:Connect(function() tip:Destroy() end) end) end -- 3. Optimization Function local function toggleFPS() isOptimized = not isOptimized btn.BackgroundColor3 = isOptimized and Color3.fromRGB(0, 180, 0) or Color3.fromRGB(40, 40, 40) if isOptimized then for _, obj in pairs(game.Workspace:GetDescendants()) do if obj:IsA("BasePart") and not obj:IsA("Terrain") then originalData[obj] = {Material = obj.Material, Color = obj.Color} obj.Material = Enum.Material.SmoothPlastic elseif obj:IsA("Decal") or obj:IsA("Texture") then originalData[obj] = {Transparency = obj.Transparency} obj.Transparency = 1 end end game.Lighting.GlobalShadows = false else for obj, data in pairs(originalData) do if obj and obj.Parent then if data.Material then obj.Material = data.Material end if data.Transparency then obj.Transparency = data.Transparency end end end originalData = {} game.Lighting.GlobalShadows = true end end -- 4. Input Connections btn.MouseButton1Click:Connect(toggleFPS) UIS.InputBegan:Connect(function(input, processed) if not processed and input.KeyCode == Enum.KeyCode.LeftControl then toggleFPS() end end)