How to Use Core Option Ability Advanced Lobby Snippet
TDS AUTOMATION API · SPACE EDITION

Macro Recorder - API

Complete reference for Tower Defense Simulator automation. API version 2.0 · Premium required
FREE | PREMIUM | BETA
CHOOSE YOUR EXPERIENCE
FREE
$0 / forever
Community Edition
  • Make Record — only use ready strategies
  • Place, Upgrade, Sell — full control
  • Loop, etc. — not available
  • Custom configs — only ready-to-use
📜 AVAILABLE SCRIPTS:
  • Auto Money Free
  • 5 pre-made strategies
⚡ Global config available for all users
PREMIUM
$7.99 / lifetime
Elite Access
  • Make Record — full API access
  • Place, Upgrade, Sell — unlimited
  • Loop, infinite cycles, etc. — full support
  • Custom configs — create your own
📜 PREMIUM SCRIPTS:
  • Auto Gems / Money (best strat)
  • Macro Recorver V1/V2
  • All Free features + 10+ extra strategies
💎 Priority updates, private support, and beta access
BETA
FREE / limited
Early Access
  • Test new features — before release
  • Limited API access — selected methods
  • Report bugs — shape the future
  • Feedback priority — direct communication
📋 BETA FEATURES:
  • Early API preview
  • Chat with Development Team
  • Unique Leaks
Apply for Beta
📘

How to Use

1. Obtain your premium key from the store.

2. Load the recorder script in your executor:

loader.lua

3. Configure global settings (_G) and use TDS methods to build your strategy.

4. For 24/7 auto-farm, place in autoexec folder with _G.AutoRejoin = true.

📁

How to use record files?

*executor/workspace/Space-Hub/Games/TDS V2/script.lua

put script.lua in *executor/autoexec or use just like script

example.lua
⚙️

CORE ENGINE METHODS + GLOBAL CONFIG (_G)

🌐 Global Configuration (set before loading)

VariableTypeDescription
_G.AutoPickupsboolAuto‑collect SnowCharms / Lorebooks
_G.AutoSkipboolAutomatically vote to skip waves
_G.AutoChainboolCycle Commander "Call Of Arms"
_G.AutoDJboolAuto‑activate DJ Booth "Drop The Beat"
_G.AutoNecroboolAuto‑activate Necromancer "Raise The Dead"
_G.AutoMercenaryboolAuto Air‑Drop from Mercenary Base (uses _G.MercenaryPath)
_G.AutoMilitaryboolAuto Airstrike from Military Base (uses _G.MilitaryPath)
_G.AntiLagboolRemove effects/projectiles to reduce lag
_G.AutoRejoinbool24/7 loop: auto‑rejoin after match + webhook logging
_G.SendWebhookboolSend match results to Discord
_G.WebhookstringDiscord webhook URL

⚔️ In-Game Core Methods

MethodParametersDescription
TDS:Place(name, x, y, z)name, coordinatesPlace tower, returns index (1‑based).
TDS:Upgrade(idx, path)index, path (1/2, default 1)Upgrade tower.
TDS:Sell(idx, reqWave)index, optional wave requirementSell tower, removes from list.
TDS:SellAll(reqWave)optional waveSell all placed towers.
TDS:SetTarget(idx, mode, reqWave)"First","Strong","Last","Random"Set targeting mode.
TDS:GetWave()Returns current wave number.
TDS:VoteSkip(start, end)start wave, optional end waveAuto vote‑skip from wave start to end.
TDS:UnlockTimeScale()Unlock timescale tickets.
TDS:TimeScale(val)0.5, 1, 1.5, 2Cycle to desired speed.
TDS:Ready()Ready up during match intermission.
config.lua
🔧

TDS:SetOption

TDS:SetOption(index, "OptionName", "Value", requiredWave)

TowerOptionValues
Mercenary Base"Unit 1" / "Unit 2" / "Unit 3""Grenadier","Rifleman","Riot Guard","Field Medic"
Trapper"Trap""Spike" or "Landmine"
DJ Booth"Track""Green","Red","Purple"
setoption.lua

TDS:Ability — special powers

TDS:Ability(index, "AbilityName", dataTable, loop)

TowerAbilityData format
Commander"Call Of Arms" / "Support Caravan"no data
DJ Booth"Drop The Beat"no data
Medic"Ubercharge"no data
Hacker"Hologram Tower"{ towerToClone = index, towerPosition = Vector3 }
Pursuit"Patrol"{ ["position"] = Vector3 }
Gatling Gun"FPS"{ ["enabled"] = true }
Brawler"Reposition"{ ["position"] = Vector3 }
Mercenary/Military"Air‑Drop"/"Airstrike"{ pathName = 1, dist = number, directionCFrame = CFrame.new() }
abilities.lua
✧ tip: For Mercenary/Military, "dist" (Air‑Drop) and "pointToEnd" (Airstrike) control path position. 0 = spawn, max varies per map (Simplicity ~156).
🚀

ADVANCED · INFINITE LOOP & POSITIONING

📁 Autoexec (24/7 AFK)

Place the main script into your executor’s Autoexec folder and set _G.AutoRejoin = true.

📐 Understanding dist / pointToEnd

dist (Mercenary Base) and pointToEnd (Military Base) define where ability triggers on path.

  • 0 = enemy spawn
  • higher value = further down the path
  • max distance map‑dependent (Simplicity ~156, find yours with RemoteSpy)
airstrike.lua

🔍 How to find exact values: Use SimpleSpy / Hydroxide, manually use ability, locate RemoteFunction "Troops" with action "Abilities", check the 'Data' table for exact numbers.

💡 999 trick: if you set value to 999, ability often targets the very end.

🛠 Utility & Internal Helpers

MethodDescription
TDS:GetGameState()Returns "LOBBY" or "GAME".
TDS:GetRewards()Parses post‑game screen → table [Coins, Gems, XP, Wave, Time, Status, Others].
TDS:RestartWithRejoin()Resets and teleports back to game.
rewards.lua
YOUR SCRIPT ON GITHUB MUST BE ONLY AFTER: START STRATEGY.
YOU DON'T NEED TO HAVE: TDS:Loadout() TDS:Mode() TDS:GameInfo().
Why you teleported to lobby?: Make sure you turn off _G.AutoRejoin = false.

⚠️ TROUBLESHOOTING & TIPS

  • ERROR "No HTTP Function": Your executor does not support 'request'. Use a supported executor like Wave, Xeno, Delta, or Arceus X.
  • TOWERS NOT PLACING: Ensure you have enough money. The script will retry automatically, but it cannot bypass your in-game cash balance.
  • INDEXING: Towers are indexed in the order they are placed (1, 2, 3...). If you sell Index 1, Index 2 remains 2; it does not shift down.
  • WEBHOOKS: Ensure your Webhook URL is the "Raw" Discord link. If the script freezes at the end of a match, check if your Webhook URL is valid.
🏠

Lobby Methods

MethodParametersDescription
TDS:Mode(difficulty)string (e.g. "Frost","Hardcore","Pizza Party")Select matchmaking mode. Maps "Hardcore"→hardcore, "Pizza Party"→halloween, "Polluted"→polluted etc.
TDS:Loadout(...)list of tower namesEquip towers (unequips current). Returns success + results table.
TDS:GameInfo(map, modifiers)map name (string), modifiers tableVote for map and modifiers. If VIP, uses override.
TDS:StartGame()Send "Ready" in lobby.
lobby.lua
📋

Complete Configuration Snippet

complete_config.lua