Advertisement
talonfrost

Trolls cant break tower script

May 10th, 2025
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 14.92 KB | Gaming | 0 0
  1. local Players = game:GetService("Players")
  2.  
  3. local RunService = game:GetService("RunService")
  4.  
  5. local UserInputService = game:GetService("UserInputService")
  6.  
  7. local TweenService = game:GetService("TweenService")
  8.  
  9. local TeleportService = game:GetService("TeleportService")
  10.  
  11. local LocalPlayer = Players.LocalPlayer
  12.  
  13. local Camera = workspace.CurrentCamera
  14.  
  15. -- Game Check Configuration
  16.  
  17. local TARGET_GAME_ID = 14493533447 -- ID for https://www.roblox.com/games/14493533447
  18.  
  19. -- Anti-Lag Configuration
  20.  
  21. local DEBOUNCE_TIME = 0.005 -- Ultra-low input lag
  22.  
  23. local ATTACK_COOLDOWN = 0.01 -- Super-fast attack rate
  24.  
  25. local MAX_HITBOX_SIZE = 10000 -- Insane max hitbox size
  26.  
  27. local MIN_HITBOX_SIZE = 10 -- Minimum hitbox size
  28.  
  29. local HITBOX_UPDATE_RATE = 1/120 -- 120 FPS hitbox updates
  30.  
  31. local SLAP_POWER = 10 -- Mega slap force (10 studs into the air)
  32.  
  33. -- Executor Compatibility: Safe wait function
  34.  
  35. local function safeWait(time)
  36.  
  37.     local start = tick()
  38.  
  39.     while tick() - start < time do
  40.  
  41.         RunService.Heartbeat:Wait()
  42.  
  43.     end
  44.  
  45. end
  46.  
  47. -- Check if in the correct game, auto-join if not
  48.  
  49. local function checkAndJoinGame()
  50.  
  51.     if game.PlaceId ~= TARGET_GAME_ID then
  52.  
  53.         print("Not in the correct game! Teleporting to Trolls Can't Break Tower...")
  54.  
  55.         pcall(function()
  56.  
  57.             TeleportService:Teleport(TARGET_GAME_ID, LocalPlayer)
  58.  
  59.         end)
  60.  
  61.         safeWait(5) -- Safe wait to prevent script execution if teleport fails
  62.  
  63.         return false
  64.  
  65.     end
  66.  
  67.     return true
  68.  
  69. end
  70.  
  71. -- Execute game check on script start
  72.  
  73. if not checkAndJoinGame() then
  74.  
  75.     return -- Halt script if not in the correct game
  76.  
  77. end
  78.  
  79. -- UI Setup with Compact, Modern Purple Theme
  80.  
  81. local ScreenGui = Instance.new("ScreenGui")
  82.  
  83. ScreenGui.Name = "TrollsCantBreakTowerScript"
  84.  
  85. ScreenGui.Parent = game.CoreGui
  86.  
  87. ScreenGui.ResetOnSpawn = false
  88.  
  89. ScreenGui.IgnoreGuiInset = true
  90.  
  91. ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  92.  
  93. local Frame = Instance.new("Frame", ScreenGui)
  94.  
  95. Frame.Size = UDim2.new(0, 350, 0, 250) -- Compact GUI
  96.  
  97. Frame.Position = UDim2.new(0.5, -175, 0.5, -125)
  98.  
  99. Frame.BackgroundColor3 = Color3.fromRGB(25, 25, 45)
  100.  
  101. Frame.BorderSizePixel = 0
  102.  
  103. Frame.ClipsDescendants = true
  104.  
  105. Frame.Active = true
  106.  
  107. Frame.Draggable = true
  108.  
  109. local UICorner = Instance.new("UICorner", Frame)
  110.  
  111. UICorner.CornerRadius = UDim.new(0, 15)
  112.  
  113. local UIStroke = Instance.new("UIStroke", Frame)
  114.  
  115. UIStroke.Color = Color3.fromRGB(100, 80, 150)
  116.  
  117. UIStroke.Thickness = 2
  118.  
  119. -- Title Bar
  120.  
  121. local TitleBar = Instance.new("Frame", Frame)
  122.  
  123. TitleBar.Size = UDim2.new(1, 0, 0, 40)
  124.  
  125. TitleBar.BackgroundColor3 = Color3.fromRGB(80, 60, 140)
  126.  
  127. TitleBar.BorderSizePixel = 0
  128.  
  129. Instance.new("UICorner", TitleBar).CornerRadius = UDim.new(0, 15)
  130.  
  131. local TitleLabel = Instance.new("TextLabel", TitleBar)
  132.  
  133. TitleLabel.Size = UDim2.new(0.7, 0, 1, 0)
  134.  
  135. TitleLabel.Position = UDim2.new(0.05, 0, 0, 0)
  136.  
  137. TitleLabel.Text = "Trolls_Cant_Break_Tower_Game_Script"
  138.  
  139. TitleLabel.TextColor3 = Color3.fromRGB(220, 200, 255)
  140.  
  141. TitleLabel.BackgroundTransparency = 1
  142.  
  143. TitleLabel.TextScaled = true
  144.  
  145. TitleLabel.Font = Enum.Font.SourceSans -- Use SourceSans for universal compatibility
  146.  
  147. local TitleStroke = Instance.new("UIStroke", TitleLabel)
  148.  
  149. TitleStroke.Color = Color3.fromRGB(0, 0, 0)
  150.  
  151. TitleStroke.Thickness = 1
  152.  
  153. -- Credits Label (Purple with Black Outline)
  154.  
  155. local CreditsLabel = Instance.new("TextLabel", Frame)
  156.  
  157. CreditsLabel.Size = UDim2.new(1, 0, 0, 30)
  158.  
  159. CreditsLabel.Position = UDim2.new(0, 0, 1, -40)
  160.  
  161. CreditsLabel.Text = "Credits: WarningBot_Dead"
  162.  
  163. CreditsLabel.TextColor3 = Color3.fromRGB(200, 150, 255)
  164.  
  165. CreditsLabel.BackgroundTransparency = 1
  166.  
  167. CreditsLabel.TextScaled = true
  168.  
  169. CreditsLabel.Font = Enum.Font.SourceSans -- Use SourceSans for universal compatibility
  170.  
  171. local CreditsStroke = Instance.new("UIStroke", CreditsLabel)
  172.  
  173. CreditsStroke.Color = Color3.fromRGB(0, 0, 0)
  174.  
  175. CreditsStroke.Thickness = 2
  176.  
  177. CreditsLabel.Visible = true -- Initially visible
  178.  
  179. -- Toggle Button
  180.  
  181. local ToggleButton = Instance.new("TextButton", Frame)
  182.  
  183. ToggleButton.Size = UDim2.new(0.9, 0, 0, 50)
  184.  
  185. ToggleButton.Position = UDim2.new(0.05, 0, 0, 50)
  186.  
  187. ToggleButton.Text = "Activate Troll System"
  188.  
  189. ToggleButton.BackgroundColor3 = Color3.fromRGB(120, 90, 180)
  190.  
  191. ToggleButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  192.  
  193. ToggleButton.TextScaled = true
  194.  
  195. ToggleButton.Font = Enum.Font.SourceSans -- Use SourceSans for universal compatibility
  196.  
  197. Instance.new("UICorner", ToggleButton).CornerRadius = UDim.new(0, 10)
  198.  
  199. local ButtonStroke = Instance.new("UIStroke", ToggleButton)
  200.  
  201. ButtonStroke.Color = Color3.fromRGB(180, 150, 220)
  202.  
  203. ButtonStroke.Thickness = 1.5
  204.  
  205. -- Hitbox Size Controls
  206.  
  207. local SizeFrame = Instance.new("Frame", Frame)
  208.  
  209. SizeFrame.Size = UDim2.new(0.9, 0, 0, 50)
  210.  
  211. SizeFrame.Position = UDim2.new(0.05, 0, 0, 110)
  212.  
  213. SizeFrame.BackgroundTransparency = 1
  214.  
  215. local IncreaseButton = Instance.new("TextButton", SizeFrame)
  216.  
  217. IncreaseButton.Size = UDim2.new(0.45, -10, 1, 0)
  218.  
  219. IncreaseButton.Position = UDim2.new(0, 0, 0, 0)
  220.  
  221. IncreaseButton.Text = "+"
  222.  
  223. IncreaseButton.BackgroundColor3 = Color3.fromRGB(100, 180, 100)
  224.  
  225. IncreaseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  226.  
  227. IncreaseButton.TextScaled = true
  228.  
  229. IncreaseButton.Font = Enum.Font.SourceSans -- Use SourceSans for universal compatibility
  230.  
  231. Instance.new("UICorner", IncreaseButton).CornerRadius = UDim.new(0, 10)
  232.  
  233. local DecreaseButton = Instance.new("TextButton", SizeFrame)
  234.  
  235. DecreaseButton.Size = UDim2.new(0.45, -10, 1, 0)
  236.  
  237. DecreaseButton.Position = UDim2.new(0.55, 0, 0, 0)
  238.  
  239. DecreaseButton.Text = "-"
  240.  
  241. DecreaseButton.BackgroundColor3 = Color3.fromRGB(180, 100, 100)
  242.  
  243. DecreaseButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  244.  
  245. DecreaseButton.TextScaled = true
  246.  
  247. DecreaseButton.Font = Enum.Font.SourceSans -- Use SourceSans for universal compatibility
  248.  
  249. Instance.new("UICorner", DecreaseButton).CornerRadius = UDim.new(0, 10)
  250.  
  251. local SizeLabel = Instance.new("TextLabel", Frame)
  252.  
  253. SizeLabel.Size = UDim2.new(0.9, 0, 0, 30)
  254.  
  255. SizeLabel.Position = UDim2.new(0.05, 0, 0, 170)
  256.  
  257. SizeLabel.Text = "Hitbox Size: 10"
  258.  
  259. SizeLabel.TextColor3 = Color3.fromRGB(220, 220, 255)
  260.  
  261. SizeLabel.BackgroundTransparency = 1
  262.  
  263. SizeLabel.TextScaled = true
  264.  
  265. SizeLabel.Font = Enum.Font.SourceSans -- Use SourceSans for universal compatibility
  266.  
  267. -- Minimize Button
  268.  
  269. local MinimizeButton = Instance.new("TextButton", TitleBar)
  270.  
  271. MinimizeButton.Size = UDim2.new(0, 35, 0, 35)
  272.  
  273. MinimizeButton.Position = UDim2.new(1, -45, 0, 2.5)
  274.  
  275. MinimizeButton.Text = "−"
  276.  
  277. MinimizeButton.BackgroundColor3 = Color3.fromRGB(180, 120, 220)
  278.  
  279. MinimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  280.  
  281. MinimizeButton.TextScaled = true
  282.  
  283. MinimizeButton.Font = Enum.Font.SourceSans -- Use SourceSans for universal compatibility
  284.  
  285. Instance.new("UICorner", MinimizeButton).CornerRadius = UDim.new(0, 10)
  286.  
  287. -- Variables
  288.  
  289. local Spamming = false
  290.  
  291. local hitboxSize = 10
  292.  
  293. local hitboxIndicator = nil
  294.  
  295. local isMinimized = false
  296.  
  297. local lastUpdate = 0
  298.  
  299. local cachedPlayers = {}
  300.  
  301. local connection
  302.  
  303. -- Create Visual Hitbox
  304.  
  305. local function createHitbox()
  306.  
  307.     if hitboxIndicator then
  308.  
  309.         pcall(function() hitboxIndicator:Destroy() end)
  310.  
  311.         hitboxIndicator = nil
  312.  
  313.     end
  314.  
  315.     local success, err = pcall(function()
  316.  
  317.         hitboxIndicator = Instance.new("Part")
  318.  
  319.         hitboxIndicator.Name = "TrollHitbox"
  320.  
  321.         hitboxIndicator.Size = Vector3.new(hitboxSize, hitboxSize, hitboxSize)
  322.  
  323.         hitboxIndicator.Anchored = true
  324.  
  325.         hitboxIndicator.CanCollide = false
  326.  
  327.         hitboxIndicator.Transparency = 0.5
  328.  
  329.         hitboxIndicator.Color = Color3.fromRGB(150, 100, 255)
  330.  
  331.         hitboxIndicator.Material = Enum.Material.ForceField
  332.  
  333.         hitboxIndicator.Parent = workspace
  334.  
  335.     end)
  336.  
  337.     if not success then
  338.  
  339.         print("Warning: Failed to create hitbox: " .. tostring(err))
  340.  
  341.     end
  342.  
  343. end
  344.  
  345. -- Update Hitbox Position/Size
  346.  
  347. local function updateHitbox()
  348.  
  349.     SizeLabel.Text = "Hitbox Size: " .. math.floor(hitboxSize) -- Always update UI
  350.  
  351.     if not Spamming or not LocalPlayer.Character or not LocalPlayer.Character:FindFirstChild("HumanoidRootPart") then
  352.  
  353.         if hitboxIndicator then
  354.  
  355.             pcall(function() hitboxIndicator:Destroy() end)
  356.  
  357.             hitboxIndicator = nil
  358.  
  359.         end
  360.  
  361.         return
  362.  
  363.     end
  364.  
  365.     if hitboxIndicator then
  366.  
  367.         pcall(function()
  368.  
  369.             hitboxIndicator.Size = Vector3.new(hitboxSize, hitboxSize, hitboxSize)
  370.  
  371.             hitboxIndicator.Position = LocalPlayer.Character.HumanoidRootPart.Position
  372.  
  373.         end)
  374.  
  375.     end
  376.  
  377. end
  378.  
  379. -- Cache Players for Performance
  380.  
  381. local function updatePlayerCache()
  382.  
  383.     cachedPlayers = {}
  384.  
  385.     pcall(function()
  386.  
  387.         for _, player in pairs(Players:GetPlayers()) do
  388.  
  389.             if player ~= LocalPlayer and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  390.  
  391.                 table.insert(cachedPlayers, player)
  392.  
  393.             end
  394.  
  395.         end
  396.  
  397.     end)
  398.  
  399. end
  400.  
  401. -- Detect Attack Remote
  402.  
  403. local function getAttackRemote()
  404.  
  405.     local char = LocalPlayer.Character
  406.  
  407.     if char then
  408.  
  409.         local success, result = pcall(function()
  410.  
  411.             for _, tool in pairs(char:GetChildren()) do
  412.  
  413.                 if tool:IsA("Tool") and tool:FindFirstChild("Event") then
  414.  
  415.                     return tool.Event
  416.  
  417.                 end
  418.  
  419.             end
  420.  
  421.         end)
  422.  
  423.         if success then
  424.  
  425.             return result
  426.  
  427.         end
  428.  
  429.     end
  430.  
  431.     return nil
  432.  
  433. end
  434.  
  435. -- Remote Fire Logic (Super High Slap with 10k Power)
  436.  
  437. local function triggerHitbox()
  438.  
  439.     while Spamming do
  440.  
  441.         local rootPart = LocalPlayer.Character and LocalPlayer.Character:FindFirstChild("HumanoidRootPart")
  442.  
  443.         local remote = getAttackRemote()
  444.  
  445.         if rootPart and remote then
  446.  
  447.             updatePlayerCache()
  448.  
  449.             for _, player in pairs(cachedPlayers) do
  450.  
  451.                 local targetPart = player.Character and player.Character:FindFirstChild("HumanoidRootPart")
  452.  
  453.                 if targetPart then
  454.  
  455.                     local distance = (targetPart.Position - rootPart.Position).Magnitude
  456.  
  457.                     if distance <= hitboxSize then
  458.  
  459.                         coroutine.wrap(function()
  460.  
  461.                             pcall(function()
  462.  
  463.                                 -- Fire remote with extreme upward force
  464.  
  465.                                 remote:FireServer("slash", player.Character, targetPart.Position, Vector3.new(0, SLAP_POWER, 0))
  466.  
  467.                                 -- Apply massive upward velocity to target
  468.  
  469.                                 if targetPart and targetPart.Parent:FindFirstChild("BodyVelocity") == nil then
  470.  
  471.                                     local bodyVelocity = Instance.new("BodyVelocity")
  472.  
  473.                                     bodyVelocity.MaxForce = Vector3.new(0, math.huge, 0)
  474.  
  475.                                     bodyVelocity.Velocity = Vector3.new(0, SLAP_POWER, 0)
  476.  
  477.                                     bodyVelocity.Parent = targetPart
  478.  
  479.                                     game.Debris:AddItem(bodyVelocity, 0.5)
  480.  
  481.                                 end
  482.  
  483.                             end)
  484.  
  485.                         end)()
  486.  
  487.                     end
  488.  
  489.                 end
  490.  
  491.             end
  492.  
  493.         end
  494.  
  495.         safeWait(ATTACK_COOLDOWN)
  496.  
  497.     end
  498.  
  499. end
  500.  
  501. -- Smooth Tween Animations
  502.  
  503. local function tweenProperty(object, property, value, duration)
  504.  
  505.     local success, tween = pcall(function()
  506.  
  507.         local tweenInfo = TweenInfo.new(duration, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)
  508.  
  509.         local tween = TweenService:Create(object, tweenInfo, {[property] = value})
  510.  
  511.         tween:Play()
  512.  
  513.         return tween
  514.  
  515.     end)
  516.  
  517.     if not success then
  518.  
  519.         print("Warning: TweenService failed, falling back to instant change")
  520.  
  521.         object[property] = value
  522.  
  523.     end
  524.  
  525.     return tween
  526.  
  527. end
  528.  
  529. -- Toggle Button Logic
  530.  
  531. ToggleButton.MouseButton1Click:Connect(function()
  532.  
  533.     Spamming = not Spamming
  534.  
  535.     if Spamming then
  536.  
  537.         ToggleButton.Text = "Troll System Active"
  538.  
  539.         tweenProperty(ToggleButton, "BackgroundColor3", Color3.fromRGB(100, 180, 100), 0.3)
  540.  
  541.         createHitbox()
  542.  
  543.         coroutine.wrap(triggerHitbox)()
  544.  
  545.     else
  546.  
  547.         ToggleButton.Text = "Activate Troll System"
  548.  
  549.         tweenProperty(ToggleButton, "BackgroundColor3", Color3.fromRGB(120, 90, 180), 0.3)
  550.  
  551.         if hitboxIndicator then
  552.  
  553.             pcall(function() hitboxIndicator:Destroy() end)
  554.  
  555.             hitboxIndicator = nil
  556.  
  557.         end
  558.  
  559.     end
  560.  
  561. end)
  562.  
  563. -- Increase/Decrease Buttons with Smooth Feedback (Always Updates Size)
  564.  
  565. IncreaseButton.MouseButton1Click:Connect(function()
  566.  
  567.     if hitboxSize < MAX_HITBOX_SIZE then
  568.  
  569.         hitboxSize = math.min(hitboxSize + 10, MAX_HITBOX_SIZE)
  570.  
  571.         if Spamming then
  572.  
  573.             createHitbox() -- Recreate hitbox if active
  574.  
  575.         end
  576.  
  577.         updateHitbox() -- Update UI and hitbox
  578.  
  579.         tweenProperty(IncreaseButton, "BackgroundColor3", Color3.fromRGB(120, 200, 120), 0.1)
  580.  
  581.         safeWait(0.1)
  582.  
  583.         tweenProperty(IncreaseButton, "BackgroundColor3", Color3.fromRGB(100, 180, 100), 0.1)
  584.  
  585.     end
  586.  
  587. end)
  588.  
  589. DecreaseButton.MouseButton1Click:Connect(function()
  590.  
  591.     if hitboxSize > MIN_HITBOX_SIZE then
  592.  
  593.         hitboxSize = math.max(hitboxSize - 10, MIN_HITBOX_SIZE)
  594.  
  595.         if Spamming then
  596.  
  597.             createHitbox() -- Recreate hitbox if active
  598.  
  599.         end
  600.  
  601.         updateHitbox() -- Update UI and hitbox
  602.  
  603.         tweenProperty(DecreaseButton, "BackgroundColor3", Color3.fromRGB(200, 120, 120), 0.1)
  604.  
  605.         safeWait(0.1)
  606.  
  607.         tweenProperty(DecreaseButton, "BackgroundColor3", Color3.fromRGB(180, 100, 100), 0.1)
  608.  
  609.     end
  610.  
  611. end)
  612.  
  613. -- Minimize GUI with Animation (Hide Credits)
  614.  
  615. MinimizeButton.MouseButton1Click:Connect(function()
  616.  
  617.     isMinimized = not isMinimized
  618.  
  619.     if isMinimized then
  620.  
  621.         tweenProperty(Frame, "Size", UDim2.new(0, 350, 0, 40), 0.3)
  622.  
  623.         CreditsLabel.Visible = false -- Hide credits
  624.  
  625.         MinimizeButton.Text = "+"
  626.  
  627.     else
  628.  
  629.         tweenProperty(Frame, "Size", UDim2.new(0, 350, 0, 250), 0.3)
  630.  
  631.         CreditsLabel.Visible = true -- Show credits
  632.  
  633.         MinimizeButton.Text = "−"
  634.  
  635.     end
  636.  
  637. end)
  638.  
  639. -- Optimized Hitbox Update
  640.  
  641. connection = RunService.Heartbeat:Connect(function(deltaTime)
  642.  
  643.     if Spamming and tick() - lastUpdate >= HITBOX_UPDATE_RATE then
  644.  
  645.         updateHitbox()
  646.  
  647.         lastUpdate = tick()
  648.  
  649.     end
  650.  
  651. end)
  652.  
  653. -- Keybind to Toggle GUI (T Key)
  654.  
  655. UserInputService.InputBegan:Connect(function(input, gameProcessed)
  656.  
  657.     if not gameProcessed and input.KeyCode == Enum.KeyCode.T then
  658.  
  659.         ScreenGui.Enabled = not ScreenGui.Enabled
  660.  
  661.     end
  662.  
  663. end)
  664.  
  665. -- Cleanup on Script End
  666.  
  667. game:BindToClose(function()
  668.  
  669.     if hitboxIndicator then
  670.  
  671.         pcall(function() hitboxIndicator:Destroy() end)
  672.  
  673.     end
  674.  
  675.     if connection then
  676.  
  677.         pcall(function() connection:Disconnect() end)
  678.  
  679.     end
  680.  
  681. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement