Advertisement
Crimsxn_K1ra

Battle Tower Script

Jan 7th, 2023
7,053
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 1 0
  1. local Workspace = game:GetService("Workspace")
  2. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  3. local Players = game:GetService("Players")
  4.  
  5.  
  6. local Player = Players.LocalPlayer
  7. local Event = ReplicatedStorage:WaitForChild("event")
  8. local Trainer = require(ReplicatedStorage:WaitForChild("trainer"))
  9. local Events = require(Player:WaitForChild("PlayerGui"):WaitForChild("framework"):WaitForChild("events"))
  10.  
  11.  
  12. local Beys = Workspace:WaitForChild("beyblades")
  13. local Battles = Workspace:WaitForChild("battles")
  14. local Specials = Workspace:WaitForChild("specials")
  15.  
  16.  
  17. function GetBey()
  18. local Bey = Beys:FindFirstChild(Player.Name)
  19. if Bey and Bey.PrimaryPart then
  20. return Bey
  21. end
  22. return false
  23. end
  24.  
  25.  
  26. Battles.ChildRemoved:Connect(function(A_1)
  27. if A_1.Name == Player.Name .. "_Target" then
  28. wait()
  29. Event:FireServer("BattleTower")
  30. end
  31. end)
  32.  
  33.  
  34. Event:FireServer("BattleTower")
  35.  
  36.  
  37. Events.TrainerBattleResult = function()
  38. wait()
  39. Trainer.close()
  40. end
  41.  
  42.  
  43. while wait(0.1) do
  44.  
  45. local Bey = GetBey()
  46. if Bey then
  47.  
  48. while Bey.Parent and wait() do
  49. local Enemy = Beys:FindFirstChild(Player.Name .. "_Target")
  50. pcall(function()
  51. Enemy:FindFirstChildOfClass("Humanoid").Health = 0
  52. end)
  53. end
  54. end
  55. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement