YT_PatricioTGN

blade

Apr 4th, 2021
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.21 KB | None | 0 0
  1. -- [[ START OF SETTINGS ]]
  2. Distance = -2 -- TP Distance from enemy
  3. BrokenServerTimer = 9999 -- Seconds. Will leave the level if a new enemy doesn't spawn within this timeframe
  4. Speed = 100 -- TP Speed, lower if you get teleported back to the lobby before finishing the level
  5. ForceExpert = true -- Force the difficulty to be 'Expert'
  6. AutoMerge = { -- Automatically merge Swords; will not merge your equipped sword
  7. Common = true,
  8. Uncommon = true,
  9. Rare = true,
  10. Epic = true
  11. }
  12. AutoSell = { -- Will not sell your equipped gear
  13. Swords = {
  14. Common = false,
  15. Uncommon = false,
  16. Rare = false,
  17. Epic = false,
  18. Legendary = false
  19. },
  20. DamageMagic = {
  21. Common = true,
  22. Uncommon = true,
  23. Rare = false,
  24. Epic = false,
  25. Legendary = false
  26. },
  27. SupportMagic = {
  28. Common = true,
  29. Uncommon = true,
  30. Rare = false,
  31. Epic = false,
  32. Legendary = false
  33. }
  34. }
  35. -- [[ END OF SETTINGS ]]
  36.  
  37.  
  38.  
  39. -- Auto-Start
  40. if game.PlaceId == 6494523288 then
  41. -- Load
  42. repeat
  43. yes,lvl,swords,damageFolder,supportFolder,swordFolder,rf,re,info = pcall(function()return
  44. game.Players.LocalPlayer.Data.Stats.Level,
  45. game.Players.LocalPlayer.Data.Swords:FindFirstChildOfClass("Folder"),
  46. game.Players.LocalPlayer.Data.Damage:FindFirstChildOfClass("Folder"),
  47. game.Players.LocalPlayer.Data.Support:FindFirstChildOfClass("Folder"),
  48. game.ReplicatedStorage.Sword,
  49. game.ReplicatedStorage.RF,
  50. game.ReplicatedStorage.RE,
  51. require(game.ReplicatedStorage.Info)
  52. end)
  53. wait(1)
  54. until rf
  55. -- Variables
  56. local player = game.Players.LocalPlayer
  57. local cum = {}
  58. -- Get Maps
  59. for map,v in pairs(info.Maps) do
  60. for i,v in pairs(v) do
  61. if type(v) == "number" and i ~= "ID" and i ~= "Badge" then
  62. table.insert(cum,{map,i,v})
  63. end
  64. end
  65. end
  66. -- Sort Maps
  67. table.sort(cum,function(sowd,invell)
  68. return invell[3] < sowd[3]
  69. end)
  70. -- Count Rarities
  71. local currentRarities = {
  72. Legendary = {},
  73. Epic = {},
  74. Rare = {},
  75. Uncommon = {},
  76. Common = {}
  77. }
  78. for i,v in pairs(swords.Parent:GetChildren()) do
  79. if v:FindFirstChild("Tag") and swordFolder:FindFirstChild(v.Tag.Value) and swordFolder[v.Tag.Value]:FindFirstChild("Rarity") and tonumber(v.Name) ~= player.Data.Stats.Sword.Value then
  80. table.insert(currentRarities[swordFolder[v.Tag.Value].Rarity.Value],v)
  81. end
  82. end
  83. -- Auto-Merge Sword
  84. for i,v in pairs(currentRarities) do
  85. -- Check
  86. if #v >= 5 and AutoMerge[i] == true then
  87. -- Grab 5 swords
  88. local merge = {}
  89. for _ = 1, 5 do
  90. table.insert(merge,currentRarities[i][_])
  91. end
  92. -- Lazy Merge
  93. for i = 1, 4 do
  94. spawn(function()
  95. rf:InvokeServer("Merge",merge,i)
  96. end)
  97. end
  98. end
  99. end
  100. -- Get Best Sword
  101. local currentBest = {player.Data.Stats.Sword.Value,swords.Parent[player.Data.Stats.Sword.Value].Amnt.Value}
  102. for i,v in pairs(swords.Parent:GetChildren()) do
  103. if v:FindFirstChild("Amnt") and v:FindFirstChild("Lvl") and v.Lvl.Value <= player.Data.Stats.Level.Value then
  104. local newBest = v.Amnt.Value
  105. if newBest > currentBest[2] then
  106. currentBest[1] = v.Name
  107. currentBest[2] = v.Amnt.Value
  108. end
  109. end
  110. end
  111. -- Equip Best Sword
  112. if player.Data.Stats.Sword.Value ~= currentBest[1] then
  113. re:FireServer("Equip",swords.Parent[currentBest[1]])
  114. wait(0.5)
  115. end
  116. -- Auto-Sell Sword
  117. for i,v in pairs(currentRarities) do
  118. if AutoSell.Swords[i] == true then
  119. for i,v in pairs(v) do
  120. rf:InvokeServer("Sell",v)
  121. end
  122. end
  123. end
  124. -- Auto-Sell Damage
  125. for i,v in pairs(damageFolder.Parent:GetChildren()) do
  126. if AutoSell.DamageMagic[info.Magic[v.Tag.Value].Rarity] and tonumber(v.Name) ~= player.Data.Stats.Damage.Value then
  127. rf:InvokeServer("Sell",v)
  128. end
  129. end
  130. -- Auto-Sell Support
  131. for i,v in pairs(supportFolder.Parent:GetChildren()) do
  132. if AutoSell.SupportMagic[info.Magic[v.Tag.Value].Rarity] and tonumber(v.Name) ~= player.Data.Stats.Support.Value then
  133. rf:InvokeServer("Sell",v)
  134. end
  135. end
  136. -- Select Best
  137. for i,v in pairs(cum) do
  138. if lvl.Value >= v[3] then
  139. rf:InvokeServer("Create",v[1],v[2],true,true)
  140. rf:InvokeServer("Start")
  141. return
  142. end
  143. end
  144. end
  145.  
  146. -- Force Expert
  147. local old;
  148. old = hookfunction(getrawmetatable(game).__namecall,function(...)
  149. local args = {...}
  150. if getnamecallmethod() == "FireServer" and tostring(args[2]) == "MapData" and ForceExpert then
  151. args[3].difficulty = "Expert"
  152. end
  153. return old(unpack(args))
  154. end)
  155.  
  156. -- Load
  157. repeat wait(1) until pcall(function() return game.Players.LocalPlayer.Character.HumanoidRootPart,workspace.Enemies:FindFirstChildOfClass("Model"),game.ReplicatedStorage.RE end)
  158.  
  159. -- Variable
  160. local player = game.Players.LocalPlayer
  161.  
  162. -- Invisciam
  163. player.DevCameraOcclusionMode = "Invisicam"
  164.  
  165. -- NoClip
  166. game:GetService("RunService").RenderStepped:Connect(function()
  167. player.Character.HumanoidRootPart.Velocity = Vector3.new()
  168. player.Character.Humanoid:ChangeState(10)
  169. end)
  170.  
  171. -- Get Closest Enemies
  172. function getEnemies()
  173. -- Variable
  174. local femboys = {}
  175. -- Get Nearby Enemies
  176. local shit = workspace.Enemies:GetChildren()
  177. for i = 1, #shit do local v = shit[i]
  178. local hum = v:FindFirstChildOfClass("Humanoid")
  179. if hum and hum.Health > 0 and v:FindFirstChild("HumanoidRootPart") then
  180. table.insert(femboys,v)
  181. end
  182. end
  183. -- Sort
  184. table.sort(femboys,function(current,mado)
  185. return player:DistanceFromCharacter(current.HumanoidRootPart.Position) < player:DistanceFromCharacter(mado.HumanoidRootPart.Position)
  186. end)
  187. -- Return
  188. return #femboys > 0 and femboys or false
  189. end
  190.  
  191. -- Broken Server Check
  192. local lastSpawn = tick()
  193. workspace.Enemies.ChildAdded:Connect(function()
  194. lastSpawn = tick()
  195. end)
  196.  
  197. -- Keel
  198. while true do
  199. -- Get Enemies
  200. local cum = getEnemies()
  201. if type(cum) == "table" then
  202. -- Set
  203. local cum1 = cum[1]
  204. -- Tween
  205. if player:DistanceFromCharacter(cum1.HumanoidRootPart.Position) > 15 then
  206. local target = cum1.HumanoidRootPart.CFrame
  207. game:GetService("TweenService"):Create(player.Character.HumanoidRootPart, TweenInfo.new(player:DistanceFromCharacter(target.Position)/Speed, Enum.EasingStyle.Linear), {CFrame = target*CFrame.Angles(math.rad(Distance > 0 and -90 or 90),0,0)+Vector3.new(0,Distance,0)}):Play()
  208. wait(player:DistanceFromCharacter(target.Position)/Speed)
  209. end
  210. -- Kill
  211. repeat
  212. -- Teleport
  213. pcall(function()
  214. player.Character.HumanoidRootPart.CFrame = cum1.HumanoidRootPart.CFrame + Vector3.new(0,Distance,0)
  215. player.Character.HumanoidRootPart.CFrame = CFrame.new(player.Character.HumanoidRootPart.Position,cum1.HumanoidRootPart.Position)
  216. end)
  217. wait()
  218. -- Attack
  219. pcall(function()
  220. for i,v in pairs(getEnemies()) do
  221. if player:DistanceFromCharacter(v.HumanoidRootPart.Position) <= 15 then
  222. game.ReplicatedStorage.RE:FireServer("Hit",v)
  223. end
  224. end
  225. end)
  226. -- Use Damage Spell
  227. game.ReplicatedStorage.Magic:FireServer("Damage")
  228. -- Use Support Spell
  229. if player.Character.Humanoid.Health < player.Character.Humanoid.MaxHealth then
  230. game.ReplicatedStorage.Magic:FireServer("Support")
  231. end
  232. until not cum1.Parent or not cum1:FindFirstChildOfClass("Humanoid") or cum1:FindFirstChildOfClass("Humanoid").Health <= 0 or not cum1:FindFirstChild("HumanoidRootPart")
  233. end
  234. wait()
  235. -- Broken Server Check
  236. if tick()-lastSpawn >= BrokenServerTimer then
  237. game:GetService("TeleportService"):Teleport(6494523288)
  238. end
  239. end
  240.  
Add Comment
Please, Sign In to add comment