![[Gamepass Unlocked!]](https://cdn.kocakz.me/images/1b88a411c53c6e505dca34583529c02842635dcc5035dee4dfa7519c3a01eb7a.webp)
Key Required

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
-- Create GUI
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Parent = LocalPlayer.PlayerGui
ScreenGui.ResetOnSpawn = false
local Frame = Instance.new("Frame")
Frame.Size = UDim2.new(0, 300, 0, 50)
Frame.Position = UDim2.new(0.5, -150, 0.1, 0)
Frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) -- Black theme
Frame.BorderColor3 = Color3.fromRGB(128, 0, 128) -- Purple border
Frame.BorderSizePixel = 2
Frame.Parent = ScreenGui
local ToggleButton1 = Instance.new("TextButton")
ToggleButton1.Size = UDim2.new(0.45, 0, 0.8, 0)
ToggleButton1.Position = UDim2.new(0.05, 0, 0.1, 0)
ToggleButton1.BackgroundColor3 = Color3.fromRGB(50, 0, 100) -- Purple button
ToggleButton1.TextColor3 = Color3.fromRGB(255, 255, 255)
ToggleButton1.Text = "Loop1: OFF (1x)"
ToggleButton1.Font = Enum.Font.SourceSansBold
ToggleButton1.TextSize = 20
ToggleButton1.Parent = Frame
local ToggleButton2 = Instance.new("TextButton")
ToggleButton2.Size = UDim2.new(0.45, 0, 0.8, 0)
ToggleButton2.Position = UDim2.new(0.5, 0, 0.1, 0)
ToggleButton2.BackgroundColor3 = Color3.fromRGB(50, 0, 100) -- Purple button
ToggleButton2.TextColor3 = Color3.fromRGB(255, 255, 255)
ToggleButton2.Text = "Loop2: OFF (1x)"
ToggleButton2.Font = Enum.Font.SourceSansBold
ToggleButton2.TextSize = 20
ToggleButton2.Parent = Frame
-- Variables
local isToggled1 = false
local isToggled2 = false
local fireCount1 = 1
local fireCount2 = 1
local ByteNetReliable = ReplicatedStorage:WaitForChild("ByteNetReliable")
local lastFireTime = tick()
local throttleRate = 0.05 -- Limit to ~20 FireServer calls per second
local maxFireCount = 10 -- Prevent excessive fireCount to reduce lag
-- Predefined arguments
local args1 = { buffer.fromstring("\f\001\0001") }
local args2 = { buffer.fromstring("\014\006\000Normal\014\006\000Normal\014\006\000Normal\014\006\000Normal\014\006\000Normal\014\006\000Golden\014\006\000Normal\014\006\000Normal") }
local args3 = { buffer.fromstring("\f\001\0002") } -- Placeholder for second loop
local args4 = { buffer.fromstring("\014\006\000Golden\014\006\000Normal\014\006\000Normal\014\006\000Golden\014\006\000Normal\014\006\000Normal\014\006\000Golden\014\006\000Normal") }
-- Toggle and increment functions
ToggleButton1.MouseButton1Click:Connect(function()
if isToggled1 then
fireCount1 = math.min(fireCount1 + 1, maxFireCount) -- Cap fire count
else
isToggled1 = true
end
ToggleButton1.Text = "Loop1: " .. (isToggled1 and "ON" or "OFF") .. " (" .. fireCount1 .. "x)"
ToggleButton1.BackgroundColor3 = isToggled1 and Color3.fromRGB(128, 0, 128) or Color3.fromRGB(50, 0, 100)
end)
ToggleButton2.MouseButton1Click:Connect(function()
if isToggled2 then
fireCount2 = math.min(fireCount2 + 1, maxFireCount) -- Cap fire count
else
isToggled2 = true
end
ToggleButton2.Text = "Loop2: " .. (isToggled2 and "ON" or "OFF") .. " (" .. fireCount2 .. "x)"
ToggleButton2.BackgroundColor3 = isToggled2 and Color3.fromRGB(128, 0, 128) or Color3.fromRGB(50, 0, 100)
end)
-- Combined loop with throttling
spawn(function()
while true do
local currentTime = tick()
if currentTime - lastFireTime >= throttleRate then
if isToggled1 then
for i = 1, fireCount1 do
ByteNetReliable:FireServer(unpack(args1))
ByteNetReliable:FireServer(unpack(args2))
end
end
if isToggled2 then
for i = 1, fireCount2 do
ByteNetReliable:FireServer(unpack(args3))
ByteNetReliable:FireServer(unpack(args4))
end
end
lastFireTime = currentTime
end
-- Lag monitor
if currentTime - lastFireTime > 0.5 then
warn("Client lag detected! Consider lowering fireCount or increasing throttleRate.")
end
task.wait() -- Minimal delay, but throttling controls actual firing
end
end)
-- Drag functionality
local dragging = false
local dragStart = nil
local startPos = nil
Frame.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = true
dragStart = input.Position
startPos = Frame.Position
end
end)
Frame.InputChanged:Connect(function(input)
if dragging and input.UserInputType == Enum.UserInputType.MouseMovement then
local delta = input.Position - dragStart
Frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end
end)
Frame.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
dragging = false
end
end)![[Gamepass Unlocked!]](https://cdn.kocakz.me/images/1b88a411c53c6e505dca34583529c02842635dcc5035dee4dfa7519c3a01eb7a.webp)



anything above 5x makes ur ping spike
@oslidezz7 unfortunately yea.. tryna find a way to optimize
@oslidezz7 updated
buttons dont work