Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --better version
- local uis = game:GetService("UserInputService")
- -- Initialize global state
- if _G.Enabled123 == nil then
- _G.Enabled123 = false
- end
- -- Store the trade configuration in _G so you can edit it anytime
- if _G.TradeConfig == nil then
- _G.TradeConfig = {
- Nation = "South Africa", -- set current nation here
- Resource = "Consumer Goods",
- Action = "Sell",
- Amount = 45,-- edit amount here
- Price = 0.15
- }
- end
- -- Prevent multiple loops
- if _G.SpamLoopRunning then
- print("Loop already running! Press L to toggle.")
- return
- end
- _G.SpamLoopRunning = true
- -- Key listener
- uis.InputBegan:Connect(function(input, gameProcessed)
- if gameProcessed then return end
- if input.KeyCode == Enum.KeyCode.L then -- edit keybind here
- _G.Enabled123 = not _G.Enabled123
- print("Spam", _G.Enabled123 and "enabled" or "disabled")
- end
- end)
- -- Main loop
- while true do
- if _G.Enabled123 == true then
- local args = {
- _G.TradeConfig.Nation,
- "ResourceTrade",
- {
- _G.TradeConfig.Resource,
- _G.TradeConfig.Action,
- _G.TradeConfig.Amount,
- _G.TradeConfig.Price,
- "Bulk"
- }
- }
- workspace:WaitForChild("GameManager"):WaitForChild("ManageAlliance"):FireServer(unpack(args))
- task.wait(0.5)
- else
- task.wait(0.1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment