Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Globals = getgenv()
- local PlayersService = game:GetService("Players")
- local TeleportService = game:GetService("TeleportService")
- local LocalPlayer = PlayersService.LocalPlayer or PlayersService.PlayerAdded:Wait()
- local AntiStuck = nil
- local function StartAntiStuck()
- local function StuckState()
- local isLoading = LocalPlayer:GetAttribute("Loading") == true
- local isTeleporting = LocalPlayer:GetAttribute("Teleporting") == true
- if isLoading or isTeleporting then
- if not AntiStuck then
- AntiStuck = task.spawn(function()
- task.wait(60)
- pcall(function()
- TeleportService:Teleport(3260590327)
- end)
- end)
- end
- else
- if AntiStuck then
- task.cancel(AntiStuck)
- AntiStuck = nil
- end
- end
- end
- LocalPlayer:GetAttributeChangedSignal("Loading"):Connect(StuckState)
- LocalPlayer:GetAttributeChangedSignal("Teleporting"):Connect(StuckState)
- StuckState()
- end
- StartAntiStuck()
- if not game:IsLoaded() then game.Loaded:Wait() end
- -- // services & main refs
- local UserInputService = game:GetService("UserInputService")
- local VirtualUser = game:GetService("VirtualUser")
- local RunService = game:GetService("RunService")
- local MarketplaceService = game:GetService("MarketplaceService")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local PathfindingService = game:GetService("PathfindingService")
- local HttpService = game:GetService("HttpService")
- local RemoteFunc = ReplicatedStorage:WaitForChild("RemoteFunction")
- local RemoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")
- local mouse = LocalPlayer:GetMouse()
- local PlayerGui = LocalPlayer:WaitForChild("PlayerGui")
- local FileName = "ADS_Config.json"
- task.spawn(function()
- local function DisableIdled()
- local success, connections = pcall(getconnections, LocalPlayer.Idled)
- if success then
- for _, v in pairs(connections) do
- v:Disable()
- end
- end
- end
- DisableIdled()
- end)
- task.spawn(function()
- LocalPlayer.Idled:Connect(function()
- VirtualUser:CaptureController()
- VirtualUser:ClickButton2(Vector2.new(0, 0))
- end)
- end)
- task.spawn(function()
- local CoreGui = game:GetService("CoreGui")
- local overlay = CoreGui:WaitForChild("RobloxPromptGui"):WaitForChild("promptOverlay")
- overlay.ChildAdded:Connect(function(child)
- if child.Name == 'ErrorPrompt' then
- while true do
- TeleportService:Teleport(3260590327)
- task.wait(5)
- end
- end
- end)
- end)
- task.spawn(function()
- pcall(function()
- RemoteFunc:InvokeServer("Settings", "Update", "Show Nametags", false)
- end)
- end)
- local function IdentifyGameState()
- local players = game:GetService("Players")
- local TempPlayer = players.LocalPlayer or players.PlayerAdded:Wait()
- local TempGui = TempPlayer:WaitForChild("PlayerGui")
- while true do
- if TempGui:FindFirstChild("ReactLobbyHud") then
- return "LOBBY"
- elseif TempGui:FindFirstChild("ReactUniversalHotbar") then
- return "GAME"
- end
- task.wait(1)
- end
- end
- local GameState = IdentifyGameState()
- local function StartAntiAfk()
- task.spawn(function()
- local LobbyTimer = 0
- while GameState == "LOBBY" do
- task.wait(1)
- LobbyTimer = LobbyTimer + 1
- if LobbyTimer >= 600 then
- TeleportService:Teleport(3260590327)
- break
- end
- end
- end)
- end
- StartAntiAfk()
- local SendRequest = request or http_request or httprequest
- or GetDevice and GetDevice().request
- if not SendRequest then
- warn("failure: no http function")
- return
- end
- local BackToLobbyRunning = false
- local AutoPickupsRunning = false
- local AutoSkipRunning = false
- local AutoClaimRewards = false
- local AntiLagRunning = false
- local AutoChainRunning = false
- local AutoDjRunning = false
- local AutoNecroRunning = false
- local TimeScaleRunning = false
- local TimeScaleNoTicketsWarned = false
- local AutoMercenaryBaseRunning = false
- local AutoMilitaryBaseRunning = false
- local SellFarmsRunning = false
- local AutoGatlingRunning = false
- local GatlingExecuted = false
- local AutoPremiumRunning = false
- local MaxPathDistance = 300 -- default
- local MilMarker = nil
- local MercMarker = nil
- local CurrentEquippedTowers = {"None"}
- local StackEnabled = false
- local SelectedTower = nil
- local StackSphere = nil
- local AllModifiers = {
- "HiddenEnemies", "Glass", "ExplodingEnemies", "Limitation",
- "Committed", "HealthyEnemies", "Fog", "FlyingEnemies",
- "Broke", "SpeedyEnemies", "Quarantine", "JailedTowers", "Inflation"
- }
- local DefaultSettings = {
- PathVisuals = false,
- MilitaryPath = false,
- MercenaryPath = false,
- AutoSkip = false,
- AutoChain = false,
- AutoGatling = false,
- AutoPremium = false,
- SupportCaravan = false,
- AutoDJ = false,
- AutoNecro = false,
- AutoRejoin = true,
- TimeScaleEnabled = false,
- TimeScaleValue = 2,
- SellFarms = false,
- AutoMercenary = false,
- AutoMilitary = false,
- Frost = false,
- Fallen = false,
- Easy = false,
- AntiLag = false,
- Disable3DRendering = false,
- AutoPickups = false,
- ClaimRewards = false,
- SendWebhook = false,
- NoRecoil = false,
- SellFarmsWave = 1,
- WebhookURL = "",
- PickupMethod = "Pathfinding",
- StreamerMode = false,
- HideUsername = true,
- StreamerName = "",
- tagName = "None",
- Modifiers = {}
- }
- local TimeScaleValues = {0.5, 1, 1.5, 2}
- local function NormalizeTimeScaleValue(val)
- val = tonumber(val)
- if not val then
- return nil
- end
- for _, v in ipairs(TimeScaleValues) do
- if v == val then
- return v
- end
- end
- return nil
- end
- local function CoerceTimeScaleValue(val, fallback)
- return NormalizeTimeScaleValue(val) or fallback
- end
- local function GetTimescaleFrame()
- local hotbar = PlayerGui:FindFirstChild("ReactUniversalHotbar")
- local frame = hotbar and hotbar:FindFirstChild("Frame")
- return frame and frame:FindFirstChild("timescale")
- end
- local StartTimeScale
- local ApplyTimeScaleOnce
- local LastState = {}
- -- // icon item ids ill add more soon arghh
- local ItemNames = {
- ["17447507910"] = "Timescale Ticket(s)",
- ["17438486690"] = "Range Flag(s)",
- ["17438486138"] = "Damage Flag(s)",
- ["17438487774"] = "Cooldown Flag(s)",
- ["17429537022"] = "Blizzard(s)",
- ["17448596749"] = "Napalm Strike(s)",
- ["18493073533"] = "Spin Ticket(s)",
- ["17429548305"] = "Supply Drop(s)",
- ["18443277308"] = "Low Grade Consumable Crate(s)",
- ["136180382135048"] = "Santa Radio(s)",
- ["18443277106"] = "Mid Grade Consumable Crate(s)",
- ["18443277591"] = "High Grade Consumable Crate(s)",
- ["132155797622156"] = "Christmas Tree(s)",
- ["124065875200929"] = "Fruit Cake(s)",
- ["17429541513"] = "Barricade(s)",
- ["110415073436604"] = "Holy Hand Grenade(s)",
- ["17429533728"] = "Frag Grenade(s)",
- ["17437703262"] = "Molotov(s)",
- ["139414922355803"] = "Present Clusters(s)"
- }
- -- // tower management core
- TDS = {
- PlacedTowers = {},
- ActiveStrat = true,
- MatchmakingMap = {
- ["Hardcore"] = "hardcore",
- ["PizzaParty"] = "halloween",
- ["Badlands"] = "badlands",
- ["PollutedWasteland"] = "polluted",
- ["DuckyEasy"] = "ducky2025",
- ["DuckyHard"] = "ducky2025"
- }
- }
- TDS["placed_towers"] = TDS.PlacedTowers
- TDS["active_strat"] = TDS.ActiveStrat
- TDS["matchmaking_map"] = TDS.MatchmakingMap
- local UpgradeHistory = {}
- -- // shared for addons
- shared.TDSTable = TDS
- shared["TDS_Table"] = TDS
- -- // load & save
- local function SaveSettings()
- local DataToSave = {}
- for key, _ in pairs(DefaultSettings) do
- DataToSave[key] = Globals[key]
- end
- writefile(FileName, HttpService:JSONEncode(DataToSave))
- end
- local function LoadSettings()
- if isfile(FileName) then
- local success, data = pcall(function()
- return HttpService:JSONDecode(readfile(FileName))
- end)
- if success and type(data) == "table" then
- for key, DefaultVal in pairs(DefaultSettings) do
- if data[key] ~= nil then
- Globals[key] = data[key]
- else
- Globals[key] = DefaultVal
- end
- end
- return
- end
- end
- for key, value in pairs(DefaultSettings) do
- Globals[key] = value
- end
- SaveSettings()
- end
- local function SetSetting(name, value)
- if DefaultSettings[name] ~= nil then
- if name == "TimeScaleValue" then
- value = CoerceTimeScaleValue(value, Globals.TimeScaleValue or 2)
- end
- Globals[name] = value
- SaveSettings()
- end
- end
- local function Apply3dRendering()
- if Globals.Disable3DRendering then
- game:GetService("RunService"):Set3dRenderingEnabled(false)
- else
- RunService:Set3dRenderingEnabled(true)
- end
- local PlayerGui = LocalPlayer:FindFirstChild("PlayerGui")
- local gui = PlayerGui and PlayerGui:FindFirstChild("ADS_BlackScreen")
- if Globals.Disable3DRendering then
- if PlayerGui and not gui then
- gui = Instance.new("ScreenGui")
- gui.Name = "ADS_BlackScreen"
- gui.IgnoreGuiInset = true
- gui.ResetOnSpawn = false
- gui.DisplayOrder = -1000
- gui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- gui.Parent = PlayerGui
- local frame = Instance.new("Frame")
- frame.Name = "Cover"
- frame.BackgroundColor3 = Color3.new(0, 0, 0)
- frame.BorderSizePixel = 0
- frame.Size = UDim2.fromScale(1, 1)
- frame.ZIndex = 0
- frame.Parent = gui
- end
- gui.Enabled = true
- else
- if gui then
- gui.Enabled = false
- end
- end
- end
- LoadSettings()
- Globals.TimeScaleValue = CoerceTimeScaleValue(Globals.TimeScaleValue, 2)
- Apply3dRendering()
- Globals.HideUsername = true
- SetSetting("HideUsername", true)
- local isTagChangerRunning = false
- local tagChangerConn = nil
- local tagChangerTag = nil
- local tagChangerOrig = nil
- local function collectTagOptions()
- local list = {}
- local seen = {}
- local function addFolder(folder)
- if not folder then
- return
- end
- for _, child in ipairs(folder:GetChildren()) do
- local childName = child.Name
- if childName and not seen[childName] then
- seen[childName] = true
- list[#list + 1] = childName
- end
- end
- end
- local content = ReplicatedStorage:FindFirstChild("Content")
- if content then
- local nametag = content:FindFirstChild("Nametag")
- if nametag then
- addFolder(nametag:FindFirstChild("Basic"))
- addFolder(nametag:FindFirstChild("Exclusive"))
- end
- end
- table.sort(list)
- table.insert(list, 1, "None")
- return list
- end
- local function stopTagChanger()
- if tagChangerConn then
- tagChangerConn:Disconnect()
- tagChangerConn = nil
- end
- if tagChangerTag and tagChangerTag.Parent and tagChangerOrig ~= nil then
- pcall(function()
- tagChangerTag.Value = tagChangerOrig
- end)
- end
- tagChangerTag = nil
- tagChangerOrig = nil
- end
- local function startTagChanger()
- if isTagChangerRunning then
- return
- end
- isTagChangerRunning = true
- task.spawn(function()
- while Globals.tagName and Globals.tagName ~= "" and Globals.tagName ~= "None" do
- local tag = LocalPlayer:FindFirstChild("Tag")
- if tag then
- if tagChangerTag ~= tag then
- if tagChangerConn then
- tagChangerConn:Disconnect()
- tagChangerConn = nil
- end
- tagChangerTag = tag
- if tagChangerOrig == nil then
- tagChangerOrig = tag.Value
- end
- end
- if tag.Value ~= Globals.tagName then
- tag.Value = Globals.tagName
- end
- if not tagChangerConn then
- tagChangerConn = tag:GetPropertyChangedSignal("Value"):Connect(function()
- if Globals.tagName and Globals.tagName ~= "" and Globals.tagName ~= "None" then
- if tag.Value ~= Globals.tagName then
- tag.Value = Globals.tagName
- end
- end
- end)
- end
- end
- task.wait(0.5)
- end
- isTagChangerRunning = false
- end)
- end
- if Globals.tagName and Globals.tagName ~= "" and Globals.tagName ~= "None" then
- startTagChanger()
- end
- local OriginalDisplayName = LocalPlayer.DisplayName
- local OriginalUserName = LocalPlayer.Name
- local SpoofTextCache = setmetatable({}, {__mode = "k"})
- local PrivacyRunning = false
- local LastSpoofName = nil
- local PrivacyConns = {}
- local PrivacyTextNodes = setmetatable({}, {__mode = "k"})
- local StreamerTag = nil
- local StreamerTagOrig = nil
- local StreamerTagConn = nil
- local function AddPrivacyConn(conn)
- if conn then
- PrivacyConns[#PrivacyConns + 1] = conn
- end
- end
- local function ClearPrivacyConns()
- for _, c in ipairs(PrivacyConns) do
- pcall(function()
- c:Disconnect()
- end)
- end
- PrivacyConns = {}
- for inst in pairs(PrivacyTextNodes) do
- PrivacyTextNodes[inst] = nil
- end
- end
- local function MakeSpoofName()
- return "BelowNatural"
- end
- local function EnsureSpoofName()
- local nm = Globals.StreamerName
- if not nm or nm == "" then
- nm = MakeSpoofName()
- SetSetting("StreamerName", nm)
- end
- return nm
- end
- local function IsTagChangerActive()
- return Globals.tagName and Globals.tagName ~= "" and Globals.tagName ~= "None"
- end
- local function SetLocalDisplayName(nm)
- if not nm or nm == "" then
- return
- end
- pcall(function()
- LocalPlayer.DisplayName = nm
- end)
- end
- local function ReplacePlain(str, old, new)
- if not str or str == "" or not old or old == "" or old == new then
- return str, false
- end
- local start = 1
- local out = {}
- local changed = false
- while true do
- local i, j = string.find(str, old, start, true)
- if not i then
- out[#out + 1] = string.sub(str, start)
- break
- end
- changed = true
- out[#out + 1] = string.sub(str, start, i - 1)
- out[#out + 1] = new
- start = j + 1
- end
- if changed then
- return table.concat(out), true
- end
- return str, false
- end
- local function ApplySpoofToInstance(inst, OldA, OldB, NewName)
- if not inst then
- return
- end
- if inst:IsA("TextLabel") or inst:IsA("TextButton") or inst:IsA("TextBox") then
- local txt = inst.Text
- if type(txt) == "string" and txt ~= "" then
- local HasA = OldA and OldA ~= "" and string.find(txt, OldA, 1, true)
- local HasB = OldB and OldB ~= "" and string.find(txt, OldB, 1, true)
- if not HasA and not HasB then
- return
- end
- local t = txt
- local changed = false
- local ch
- if OldA and OldA ~= "" then
- t, ch = ReplacePlain(t, OldA, NewName)
- if ch then changed = true end
- end
- if OldB and OldB ~= "" then
- t, ch = ReplacePlain(t, OldB, NewName)
- if ch then changed = true end
- end
- if changed then
- if SpoofTextCache[inst] == nil then
- SpoofTextCache[inst] = txt
- end
- inst.Text = t
- end
- end
- end
- end
- local function RestoreSpoofText()
- for inst, txt in pairs(SpoofTextCache) do
- if inst and inst.Parent then
- pcall(function()
- inst.Text = txt
- end)
- end
- SpoofTextCache[inst] = nil
- end
- end
- local function GetPrivacyName()
- if Globals.StreamerMode then
- return EnsureSpoofName()
- end
- if Globals.HideUsername then
- return "████████"
- end
- return nil
- end
- local function AddPrivacyNode(inst)
- if not (inst:IsA("TextLabel") or inst:IsA("TextButton") or inst:IsA("TextBox")) then
- return
- end
- PrivacyTextNodes[inst] = true
- local nm = GetPrivacyName()
- if nm then
- ApplySpoofToInstance(inst, OriginalDisplayName, OriginalUserName, nm)
- end
- end
- local function HookPrivacyRoot(root)
- if not root then
- return
- end
- for _, inst in ipairs(root:GetDescendants()) do
- AddPrivacyNode(inst)
- end
- AddPrivacyConn(root.DescendantAdded:Connect(function(inst)
- if GetPrivacyName() then
- AddPrivacyNode(inst)
- end
- end))
- end
- local function SweepPrivacyText(nm)
- for inst in pairs(PrivacyTextNodes) do
- if inst and inst.Parent then
- ApplySpoofToInstance(inst, OriginalDisplayName, OriginalUserName, nm)
- else
- PrivacyTextNodes[inst] = nil
- end
- end
- end
- local function ApplyStreamerTag()
- if IsTagChangerActive() then
- if StreamerTagConn then
- StreamerTagConn:Disconnect()
- StreamerTagConn = nil
- end
- StreamerTag = nil
- StreamerTagOrig = nil
- return
- end
- local nm = EnsureSpoofName()
- local tag = LocalPlayer:FindFirstChild("Tag")
- if not tag then
- return
- end
- if StreamerTag and StreamerTag ~= tag then
- if StreamerTagConn then
- StreamerTagConn:Disconnect()
- StreamerTagConn = nil
- end
- end
- if StreamerTag ~= tag then
- StreamerTag = tag
- StreamerTagOrig = tag.Value
- end
- if tag.Value ~= nm then
- tag.Value = nm
- end
- if StreamerTagConn then
- StreamerTagConn:Disconnect()
- StreamerTagConn = nil
- end
- StreamerTagConn = tag:GetPropertyChangedSignal("Value"):Connect(function()
- if not Globals.StreamerMode then
- return
- end
- if IsTagChangerActive() then
- return
- end
- local nm2 = EnsureSpoofName()
- if tag.Value ~= nm2 then
- tag.Value = nm2
- end
- end)
- end
- local function RestoreStreamerTag()
- if StreamerTagConn then
- StreamerTagConn:Disconnect()
- StreamerTagConn = nil
- end
- if IsTagChangerActive() then
- StreamerTag = nil
- StreamerTagOrig = nil
- return
- end
- if StreamerTag and StreamerTag.Parent and StreamerTagOrig ~= nil then
- pcall(function()
- StreamerTag.Value = StreamerTagOrig
- end)
- end
- StreamerTag = nil
- StreamerTagOrig = nil
- end
- local function ApplyPrivacyOnce()
- local nm = GetPrivacyName()
- if not nm then
- return
- end
- if LastSpoofName and LastSpoofName ~= nm then
- RestoreSpoofText()
- end
- if Globals.StreamerMode then
- ApplyStreamerTag()
- else
- RestoreStreamerTag()
- end
- SetLocalDisplayName(nm)
- SweepPrivacyText(nm)
- LastSpoofName = nm
- end
- local function StopPrivacyMode()
- ClearPrivacyConns()
- RestoreSpoofText()
- LastSpoofName = nil
- RestoreStreamerTag()
- SetLocalDisplayName(OriginalDisplayName)
- PrivacyRunning = false
- end
- local function StartPrivacyMode()
- if PrivacyRunning then
- return
- end
- PrivacyRunning = true
- ClearPrivacyConns()
- ApplyPrivacyOnce()
- local pg = LocalPlayer:FindFirstChild("PlayerGui")
- if pg then
- HookPrivacyRoot(pg)
- end
- local CoreGui = game:GetService("Co
Advertisement
Add Comment
Please, Sign In to add comment