Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- GUI + Grab + Anti-AFK + Anti-Lag Toggle Script (LocalScript)
- local Players = game:GetService("Players")
- local LocalPlayer = Players.LocalPlayer
- local ScreenGui = Instance.new("ScreenGui")
- local MainFrame = Instance.new("Frame")
- local GrabButton = Instance.new("TextButton")
- local AntiAFKButton = Instance.new("TextButton")
- local AntiLagButton = Instance.new("TextButton")
- local CloseButton = Instance.new("TextButton")
- local CreditLabel = Instance.new("TextLabel")
- local isGrabbing = false
- local isAntiAFK = false
- local isAntiLag = false
- local grabThread = nil
- local afkThread = nil
- ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")
- ScreenGui.Name = "CashGrabGUI"
- ScreenGui.ResetOnSpawn = false
- MainFrame.Name = "MainFrame"
- MainFrame.Parent = ScreenGui
- MainFrame.Size = UDim2.new(0, 180, 0, 190)
- MainFrame.Position = UDim2.new(0, 30, 0, 100)
- MainFrame.BackgroundColor3 = Color3.fromRGB(45, 45, 45)
- MainFrame.BorderSizePixel = 0
- MainFrame.Active = true
- MainFrame.Draggable = true
- GrabButton.Parent = MainFrame
- GrabButton.Size = UDim2.new(0, 140, 0, 35)
- GrabButton.Position = UDim2.new(0, 20, 0, 25)
- GrabButton.Text = "Grab Cash"
- GrabButton.BackgroundColor3 = Color3.fromRGB(35, 200, 100)
- GrabButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- GrabButton.Font = Enum.Font.SourceSansBold
- GrabButton.TextSize = 18
- AntiAFKButton.Parent = MainFrame
- AntiAFKButton.Size = UDim2.new(0, 140, 0, 35)
- AntiAFKButton.Position = UDim2.new(0, 20, 0, 70)
- AntiAFKButton.Text = "Anti-AFK"
- AntiAFKButton.BackgroundColor3 = Color3.fromRGB(100, 100, 255)
- AntiAFKButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- AntiAFKButton.Font = Enum.Font.SourceSansBold
- AntiAFKButton.TextSize = 18
- -- Anti-Lag Toggle Button
- AntiLagButton.Parent = MainFrame
- AntiLagButton.Size = UDim2.new(0, 140, 0, 30)
- AntiLagButton.Position = UDim2.new(0, 20, 0, 115)
- AntiLagButton.Text = "Enable Anti-Lag"
- AntiLagButton.BackgroundColor3 = Color3.fromRGB(255, 180, 50)
- AntiLagButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- AntiLagButton.Font = Enum.Font.SourceSansBold
- AntiLagButton.TextSize = 16
- -- Credit Label
- CreditLabel.Parent = MainFrame
- CreditLabel.Size = UDim2.new(0, 160, 0, 20)
- CreditLabel.Position = UDim2.new(0, 10, 0, 155)
- CreditLabel.Text = "YT:SeanBlox"
- CreditLabel.BackgroundTransparency = 1
- CreditLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- CreditLabel.Font = Enum.Font.SourceSans
- CreditLabel.TextSize = 14
- -- Close Button
- CloseButton.Parent = MainFrame
- CloseButton.Size = UDim2.new(0, 20, 0, 20)
- CloseButton.Position = UDim2.new(1, -25, 0, 5)
- CloseButton.Text = "X"
- CloseButton.BackgroundColor3 = Color3.fromRGB(200, 50, 50)
- CloseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
- CloseButton.Font = Enum.Font.SourceSansBold
- CloseButton.TextSize = 14
- -- Grab Cash Logic
- GrabButton.MouseButton1Click:Connect(function()
- isGrabbing = not isGrabbing
- if isGrabbing then
- GrabButton.Text = "Stop Grab"
- grabThread = task.spawn(function()
- while isGrabbing do
- local args = { [1] = "150kM" }
- game:GetService("ReplicatedStorage"):WaitForChild("Rewards"):WaitForChild("Claim"):FireServer(unpack(args))
- task.wait()
- end
- end)
- else
- GrabButton.Text = "Grab Cash"
- end
- end)
- -- Anti-AFK Logic
- AntiAFKButton.MouseButton1Click:Connect(function()
- isAntiAFK = not isAntiAFK
- if isAntiAFK then
- AntiAFKButton.Text = "Stop AFK"
- afkThread = task.spawn(function()
- local vu = game:GetService("VirtualUser")
- LocalPlayer.Idled:Connect(function()
- if isAntiAFK then
- vu:Button2Down(Vector2.new(0,0), workspace.CurrentCamera.CFrame)
- task.wait(1)
- vu:Button2Up(Vector2.new(0,0), workspace.CurrentCamera.CFrame)
- end
- end)
- end)
- else
- AntiAFKButton.Text = "Anti-AFK"
- end
- end)
- -- Anti-Lag Functions
- local function removeEffects()
- for _, obj in ipairs(workspace:GetDescendants()) do
- if obj:IsA("ParticleEmitter") or obj:IsA("Trail") or obj:IsA("Smoke") or obj:IsA("Fire") then
- obj.Enabled = false
- elseif obj:IsA("Explosion") then
- obj:Destroy()
- end
- end
- end
- local function lowGraphics()
- settings().Rendering.QualityLevel = Enum.QualityLevel.Level01
- end
- local function removeTextures()
- for _, obj in ipairs(workspace:GetDescendants()) do
- if obj:IsA("Texture") or obj:IsA("Decal") then
- obj:Destroy()
- end
- end
- end
- local function simplifyLighting()
- local lighting = game:GetService("Lighting")
- lighting.GlobalShadows = false
- lighting.FogEnd = 1000000
- lighting.Brightness = 1
- end
- local function stopAllAnimations()
- for _, model in ipairs(workspace:GetDescendants()) do
- if model:IsA("Model") then
- local humanoid = model:FindFirstChildOfClass("Humanoid")
- if humanoid then
- for _, track in ipairs(humanoid:GetPlayingAnimationTracks()) do
- track:Stop()
- end
- end
- end
- end
- end
- local function blockAnimationLoading()
- for _, character in ipairs(workspace:GetDescendants()) do
- local animator = character:FindFirstChildWhichIsA("Animator", true)
- if animator then
- animator.AnimationPlayed:Connect(function(track)
- track:Stop()
- end)
- end
- end
- end
- -- Anti-Lag Toggle Logic
- AntiLagButton.MouseButton1Click:Connect(function()
- isAntiLag = not isAntiLag
- if isAntiLag then
- AntiLagButton.Text = "Anti-Lag ON"
- removeEffects()
- removeTextures()
- simplifyLighting()
- lowGraphics()
- stopAllAnimations()
- blockAnimationLoading()
- else
- AntiLagButton.Text = "Enable Anti-Lag"
- end
- end)
- -- Close Logic
- CloseButton.MouseButton1Click:Connect(function()
- isGrabbing = false
- isAntiAFK = false
- if grabThread then coroutine.close(grabThread) end
- if afkThread then coroutine.close(afkThread) end
- ScreenGui:Destroy()
- end)
Advertisement
Add Comment
Please, Sign In to add comment