Advertisement
MegumuSenpai

Saber Simulator | AutoFarm GUI Source

Oct 29th, 2019
1,619
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.42 KB | None | 0 0
  1. --Script
  2. pcall(function()
  3. if getgenv().exe ~= true then
  4. --Library
  5. local library = loadstring(game:HttpGet("https://pastebin.com/raw/eWKgbdix", true))()
  6.  
  7. --Main
  8. local w = library:CreateWindow('Saber Farm')
  9.  
  10. --Credit Tab
  11. local cred = library:CreateWindow('Credits')
  12.  
  13. --Credits
  14. cred:Section('Scripts: Megumu')
  15. cred:Section('UI Library: wally')
  16.  
  17. --Top
  18. w:Section('Made by Megumu')
  19.  
  20. --Toogle
  21. w:Section('Auto Farms')
  22. local t = w:Toggle('Strength', {flag = "farm"})
  23. local t = w:Toggle('Boss', {flag = "boss"})
  24. local t = w:Toggle('Daily Reward', {flag = "daily"})
  25.  
  26. --Section
  27. w:Section('Auto Upgrade')
  28.  
  29. --Toogles
  30. local t = w:Toggle('Saber', {flag = "saber"})
  31. local t = w:Toggle('DNA', {flag = "dna"})
  32. local t = w:Toggle('Class', {flag = "class"})
  33. local t = w:Toggle('Aura', {flag = "aura"})
  34.  
  35. --Section
  36. w:Section('Auto Sell')
  37.  
  38. --Toogles
  39. local t = w:Toggle('Enabled', {flag = "sell"})
  40. local t = w:Toggle('Fill', {flag = "fill"})
  41.  
  42. --Section
  43. w:Section('Teleports')
  44. local t = w:Toggle('Coins', {flag = "coins"})
  45. local t = w:Toggle('Candy', {flag = "corn"})
  46. local t = w:Toggle('NoClip', {flag = "noclip"})
  47. local t = w:Slider("TP Speed", {
  48. min = 10;
  49. max = 40;
  50. flag = 'tpspeed'
  51. },function(v)
  52. getgenv().tpspeed = tonumber(v)
  53. end)
  54.  
  55. --Pets
  56. local pet = library:CreateWindow('Pets')
  57.  
  58. --Toggles
  59. pet:Section('Auto Buy')
  60. local t = pet:Toggle('Auto Buy', {flag = "petbuy"})
  61. --Get List
  62. local elist = {}
  63. for i,v in pairs(game.ReplicatedStorage.Eggs:GetChildren()) do
  64. table.insert(elist, v.Name)
  65. end
  66. pet:Dropdown("Eggs", {
  67. location = getgenv();
  68. flag = "egg";
  69. list = elist
  70. }, function(new)
  71. getgenv().egg = tostring(new)
  72. print(new)
  73. end)
  74.  
  75. --Settings
  76. pet:Section('Auto Sell')
  77. local t = pet:Toggle('Auto Sell', {flag = "petsell"})
  78. local box = pet:Box('Strength', {
  79. flag = "str";
  80. type = 'number';
  81. }, function(new, old, enter)
  82. getgenv().petstrength = new
  83. end)
  84. local box = pet:Box('Coins', {
  85. flag = "str";
  86. type = 'number';
  87. }, function(new, old, enter)
  88. getgenv().petcoin = new
  89. end)
  90. local box = pet:Box('Crowns', {
  91. flag = "str";
  92. type = 'number';
  93. }, function(new, old, enter)
  94. getgenv().petcrown = new
  95. end)
  96.  
  97. --Anti-AFK
  98. local VirtualUser=game:service'VirtualUser'
  99. game:GetService("Players").LocalPlayer.Idled:connect(function()
  100. VirtualUser:CaptureController()
  101. VirtualUser:ClickButton2(Vector2.new())
  102. end)
  103.  
  104. --Globals
  105. getgenv().exe = true
  106. getgenv().petcrown = 1
  107. getgenv().petcoin = 1
  108. getgenv().petstrength = 1
  109. getgenv().tpspeed = 10
  110. getgenv().egg = "Basic Egg"
  111. getgenv().TELEPORTING = false
  112.  
  113. --Variables
  114. local RS = game.ReplicatedStorage
  115. local events = RS.Events
  116. local player = game.Players.LocalPlayer
  117.  
  118. if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(game.Players.LocalPlayer.UserId, 7163507) then
  119. getgenv().speedGP = true;
  120. else
  121. getgenv().SpeedGP = false;
  122. end
  123.  
  124. --Credits
  125. loadstring(game:HttpGet("https://pastebin.com/raw/vJg6Sa8w", true))()
  126.  
  127. --Check
  128. function check(p, i)
  129. if p:FindFirstChild(i) then
  130. return true
  131. else
  132. return false
  133. end
  134. end
  135.  
  136. --Equip
  137. function equip()
  138. if player.Character:FindFirstChildOfClass("Tool") then
  139. return true
  140. elseif player:FindFirstChild("Backpack") and player.Backpack:FindFirstChildOfClass("Tool") and player.Character:FindFirstChild("Humanoid") then
  141. repeat
  142. if player:FindFirstChild("Backpack") and player.Character:FindFirstChild("Humanoid") and player.Backpack:FindFirstChildOfClass("Tool") then
  143. player.Character.Humanoid:EquipTool(player.Backpack:FindFirstChildOfClass("Tool"))
  144. end
  145. wait()
  146. until player.Character:FindFirstChildOfClass("Tool")
  147. return true
  148. else
  149. return false
  150. end
  151. end
  152.  
  153. --NoClip
  154. spawn(function()
  155. while wait(0.25) do
  156. if w.flags.noclip and tostring(Stepped) ~= "Connection" then
  157. Stepped = game:GetService('RunService').Stepped:Connect(function()
  158. if player.Character and player.Character:FindFirstChild("Humanoid") then
  159. game.Players.LocalPlayer.Character.Humanoid:ChangeState(11)
  160. end
  161. end)
  162. elseif not w.flags.noclip and Stepped then
  163. Stepped:Disconnect()
  164. Stepped = nil
  165. end
  166. end
  167. end)
  168.  
  169. --Delete Pet
  170. function petdel(pet)
  171. events.PetCommand:FireServer(pet.Name, "Delete")
  172. end
  173.  
  174. --Pet Buy
  175. spawn(function()
  176. while wait(0.15) do
  177. if pet.flags.petbuy then
  178. if RS.Eggs:FindFirstChild(getgenv().egg) then
  179. events.HatchEggs:InvokeServer(RS.Eggs[getgenv().egg], 1)
  180. wait(0.15)
  181. end
  182. end
  183. end
  184. end)
  185.  
  186. --Pet Sell
  187. spawn(function()
  188. while wait(0.15) do
  189. if pet.flags.petsell then
  190. if check(player, "PlayerGui") and check(player.PlayerGui, "Gui") and check(player.PlayerGui.Gui, "Submenus") and check(player.PlayerGui.Gui.Submenus, "PetsInventory") and check(player.PlayerGui.Gui.Submenus.PetsInventory, "PetsFrame") and check(player.PlayerGui.Gui.Submenus.PetsInventory.PetsFrame, "Frame") then
  191. for i,v in pairs(player.PlayerGui.Gui.Submenus.PetsInventory.PetsFrame.Frame:GetChildren()) do
  192. if v:IsA("ImageButton") and check(v, "IMG") and v.IMG:FindFirstChildOfClass("ViewportFrame") then
  193. local PLR_PET = v.IMG:FindFirstChildOfClass("ViewportFrame").Name
  194. if v:FindFirstChild("Shiny") and v.Shiny.Visible == true then
  195. Shiny = 2;
  196. else
  197. Shiny = 1;
  198. end
  199. if RS.Pets:FindFirstChild(PLR_PET) then
  200. if RS.Pets[PLR_PET].StrengthMulti.Value * Shiny < getgenv().petstrength then
  201. petdel(v)
  202. end
  203. wait()
  204. if RS.Pets[PLR_PET].CoinsMulti.Value * Shiny < getgenv().petcoin then
  205. petdel(v)
  206. end
  207. wait()
  208. if RS.Pets[PLR_PET].CrownsMulti.Value * Shiny < getgenv().petcrown then
  209. petdel(v)
  210. end
  211. wait()
  212. end
  213. end
  214. end
  215. end
  216. end
  217. end
  218. end)
  219.  
  220. --Auto Stuff
  221. spawn(function()
  222. while true do
  223. if w.flags.farm then
  224. --AutoSaber
  225. if w.flags.saber then
  226. for i,v in pairs(RS.ShopItems.Swords:GetChildren()) do
  227. if not v:FindFirstChild("ID") then
  228. events.BuyItem:FireServer(v)
  229. end
  230. end
  231. end
  232. wait(0.5)
  233. --AutoDNA
  234. if w.flags.dna then
  235. for i,v in pairs(RS.ShopItems.Backpacks:GetChildren()) do
  236. if not v:FindFirstChild("ID") then
  237. events.BuyItem:FireServer(v)
  238. end
  239. end
  240. end
  241. wait(0.5)
  242. --AutoClass
  243. if w.flags.class then
  244. for i,v in pairs(RS.ShopItems.Classes:GetChildren()) do
  245. if not v:FindFirstChild("ID") then
  246. events.BuyItem:FireServer(v)
  247. end
  248. end
  249. end
  250. wait(0.5)
  251. --Daily
  252. if w.flags.daily then
  253. if workspace.DailyReward.Location.BillboardGui.Frame.TextLabel2.Text == "DAILY REWARD" and check(player.Character, "HumanoidRootPart") then
  254. getgenv().TELEPORTING = true;
  255. game:GetService("TweenService"):Create(player.Character.HumanoidRootPart, TweenInfo.new(player:DistanceFromCharacter(workspace.DailyReward.Location.Position)/getgenv().tpspeed, Enum.EasingStyle.Linear), {CFrame = workspace.DailyReward.Location.CFrame}):Play()
  256. wait(player:DistanceFromCharacter(workspace.DailyReward.Location.Position)/getgenv().tpspeed)
  257. getgenv().TELEPORTING = false;
  258. end
  259. end
  260. wait(0.5)
  261. if w.flags.aura then
  262. for i,v in pairs(RS.ShopItems.Auras:GetChildren()) do
  263. if not v:FindFirstChild("ID") then
  264. events.BuyItem:FireServer(v)
  265. end
  266. end
  267. end
  268. wait(0.5)
  269. else
  270. wait(0.5)
  271. end
  272. end
  273. wait()
  274. end)
  275.  
  276. --Boss
  277. spawn(function()
  278. while wait() do
  279. if w.flags.boss then
  280. if getgenv().TELEPORTING == false and check(workspace, "Boss") and check(workspace.Boss, "Health") and workspace.Boss.Health.Value > 0 and check(player.Character, "HumanoidRootPart") then
  281. enemy = workspace:FindFirstChild("Boss")
  282. getgenv().TELEPORTING = true
  283. game:GetService("TweenService"):Create(player.Character.HumanoidRootPart, TweenInfo.new(player:DistanceFromCharacter(enemy.HumanoidRootPart.Position)/getgenv().tpspeed, Enum.EasingStyle.Linear), {CFrame = enemy.HumanoidRootPart.CFrame}):Play()
  284. wait(player:DistanceFromCharacter(enemy.HumanoidRootPart.Position)/getgenv().tpspeed)
  285. repeat
  286. if player.Character:FindFirstChild("HumanoidRootPart") and enemy:FindFirstChild("HumanoidRootPart") and player:DistanceFromCharacter(enemy.HumanoidRootPart.Position) < 10 then
  287. player.Character.HumanoidRootPart.CFrame = enemy.HumanoidRootPart.CFrame
  288. if equip() then
  289. player.Character:FindFirstChildOfClass("Tool").RemoteClick:FireServer()
  290. end
  291. wait()
  292. elseif check(player.Character, "HumanoidRootPart") and check(enemy, "HumanoidRootPart") then
  293. game:GetService("TweenService"):Create(player.Character.HumanoidRootPart, TweenInfo.new(player:DistanceFromCharacter(enemy.HumanoidRootPart.Position)/getgenv().tpspeed, Enum.EasingStyle.Linear), {CFrame = enemy.HumanoidRootPart.CFrame}):Play()
  294. wait(player:DistanceFromCharacter(enemy.HumanoidRootPart.Position)/getgenv().tpspeed)
  295. end
  296. until w.flags.boss == false or enemy == nil or enemy.Parent == nil or not enemy:FindFirstChild("Health") or enemy.Health.Value <= 0
  297. getgenv().TELEPORTING = false
  298. end
  299. end
  300. end
  301. end)
  302.  
  303. --Find Nearest
  304. function nearest(Pose, type)
  305. local Closest
  306. local Distance = math.huge
  307. for _,v in pairs(workspace[type]:GetChildren()) do
  308. if getgenv().TELEPORTING == false and v:FindFirstChild("TouchInterest") and player.Character:FindFirstChild("HumanoidRootPart") then
  309. local newDistance = (v.Position - Pose).magnitude
  310. if newDistance < Distance then
  311. Closest = v
  312. Distance = newDistance
  313. end
  314. end
  315. end
  316. return Closest
  317. end
  318.  
  319. --TP Collect
  320. function collect(type)
  321. repeat
  322. if check(player.Character, "HumanoidRootPart") then
  323. v = nearest(player.Character.HumanoidRootPart.Position, type)
  324. end
  325. wait(0.25)
  326. until v ~= nil
  327. if getgenv().TELEPORTING == false and v:FindFirstChild("TouchInterest") and player.Character:FindFirstChild("HumanoidRootPart") then
  328. getgenv().TELEPORTING = true
  329. game:GetService("TweenService"):Create(player.Character.HumanoidRootPart, TweenInfo.new(player:DistanceFromCharacter(v.Position)/getgenv().tpspeed, Enum.EasingStyle.Linear), {CFrame = v.CFrame}):Play()
  330. wait(player:DistanceFromCharacter(v.Position)/getgenv().tpspeed)
  331. getgenv().TELEPORTING = false
  332. return
  333. end
  334. end
  335.  
  336. --Collect Coins
  337. spawn(function()
  338. while true do
  339. if w.flags.coins then
  340. collect("CoinsHolder")
  341. end
  342. wait(0.25)
  343. if w.flags.corn then
  344. collect("CandyHolder")
  345. end
  346. wait(0.25)
  347. end
  348. end)
  349.  
  350. --Sell
  351. spawn(function()
  352. while wait() do
  353. if w.flags.sell then
  354. if w.flags.fill and player:FindFirstChild("PlayerGui") and player.PlayerGui:FindFirstChild("Gui") and player.PlayerGui.Gui:FindFirstChild("Home") and player.PlayerGui.Gui.Home:FindFirstChild("Sand") and player.PlayerGui.Gui.Home.Sand:FindFirstChild("Amount") then
  355. if string.split(player.PlayerGui.Gui.Home.Sand.Amount.Text, " / ")[1] == string.split(player.PlayerGui.Gui.Home.Sand.Amount.Text, " / ")[2] then
  356. if check(player.Character, "HumanoidRootPart") and player:DistanceFromCharacter(workspace.Locations.Sell.Position) > 15 and getgenv().TELEPORTING == false then
  357. getgenv().TELEPORTING = true
  358. game:GetService("TweenService"):Create(player.Character.HumanoidRootPart, TweenInfo.new(player:DistanceFromCharacter(workspace.Locations.Sell.Position)/getgenv().tpspeed, Enum.EasingStyle.Linear), {CFrame = workspace.Locations.Sell.CFrame}):Play()
  359. wait(player:DistanceFromCharacter(workspace.Locations.Sell.Position)/getgenv().tpspeed)
  360. getgenv().TELEPORTING = false
  361. end
  362. events.Sell:FireServer()
  363. end
  364. else
  365. if check(player.Character, "HumanoidRootPart") and player:DistanceFromCharacter(workspace.Locations.Sell.Position) > 15 and getgenv().TELEPORTING == false then
  366. getgenv().TELEPORTING = true
  367. game:GetService("TweenService"):Create(player.Character.HumanoidRootPart, TweenInfo.new(player:DistanceFromCharacter(workspace.Locations.Sell.Position)/getgenv().tpspeed, Enum.EasingStyle.Linear), {CFrame = workspace.Locations.Sell.CFrame}):Play()
  368. wait(player:DistanceFromCharacter(workspace.Locations.Sell.Position)/getgenv().tpspeed)
  369. getgenv().TELEPORTING = false
  370. end
  371. events.Sell:FireServer()
  372. end
  373. end
  374. end
  375. end)
  376.  
  377. --Strength
  378. while true do
  379. if w.flags.farm then
  380. --AutoFarm
  381. if equip() then
  382. events.Clicked:FireServer()
  383. if getgenv().speedGP then
  384. if player.Character:FindFirstChildOfClass("Tool"):FindFirstChild("SwingDelay") then
  385. wait(player.Character:FindFirstChildOfClass("Tool").SwingDelay.Value/2)
  386. else
  387. wait(1)
  388. end
  389. else
  390. if player.Character:FindFirstChildOfClass("Tool"):FindFirstChild("SwingDelay") then
  391. wait(player.Character:FindFirstChildOfClass("Tool").SwingDelay.Value)
  392. else
  393. wait(1)
  394. end
  395. end
  396. end
  397. end
  398. wait()
  399. end
  400. end
  401. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement