Advertisement
Guest User

1.1.1b Dev

a guest
Feb 21st, 2019
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.14 KB | None | 0 0
  1.  
  2.  
  3.  
  4. user = game:GetService'Players'.LocalPlayer
  5. name = user.Name
  6. id = user.UserId
  7. a = game:HttpGet("eskihosting.org/whitelist?user="..name.."&id="..id)
  8.  
  9.  
  10.  
  11.  
  12. local asset = 2251689019
  13. sg = Game:GetObjects("rbxassetid://"..asset)[1]
  14. sg.drag.Text = "Mining Simulator Gui, Version: 1.1.1b - Dev Version"
  15. drag = sg.drag
  16. players = game:GetService('Players')
  17. player = players.LocalPlayer
  18. char = player.Character
  19. Character = char
  20. mouse = player:GetMouse()
  21. sg.Parent = game.CoreGui
  22. local paused = false
  23. local Main,OreTp,Keybinds,Players
  24.  
  25. local chars = "abcdefghijklmnopqrstuvwxyz-_=+\|]}[{';:lL,<.>§¦¦¦æ¦"
  26. local codes = {'Duckie','Valkyrie','Wings','Dominus','Accessories','MineAlot','Rainbowite','GetSlicked','Challenge','Adventure','Light','Oof','NewQuests','SummerParadise','HammieJammieSucksxInfinity','Sunscreen','BeachBall','SandCastles','July21st','sircfenner','Dreamy','Fluffy','Skies','Sandy','Scorch','BaconHair','HammieJammieDoesntSuck','NosniyIsCool','Vacation','Lemonaide','CoolWater','Patriot','PatrioticStars','America','HammieJammieSucksx2','Catman','Koala','Lucky','HammieJammieSucks','UnderTheSea','Summer','Sand','Water','Atlantis','LegendaryHatCode','LegendaryEggCode','SuperSecretCode','ILOVECODES','TheRamblingNation','GummyBears','Invasion','Trades','Sweets','Coal','DiggingDeep','Level','SecretEgg','Bonus','Golden','Grind','Gamer','Rebirths','100Million','Money','T-Rex','Dinosaur','Overhaul','Jam','Toast','Bread','Retro','NewStart','WeBreakRoblox','AppleJuice','StuffedAnimal','Train','PlushyScythe','PlushyShadowScythe','Bear','Arcade','Games','Plushy','Sandbox','Unobtainible','ToyChest','Exclusive','PinkArmySkin','PinkArmy','Mission','Silver','Español','Update!','Comic','HiddenTreasure','Defild','Lamb','Fans','Danger','Eggo!','TestingThing','Cool','Ore','JellyBean','Pumped','Awesome','Abstract','Lollipop','Candy','Pets','Bunny','Epic','Aliens','LotsOfCoins','Dino','Selfie','Cave','Eggs','Momma','Rare','EvenMoreHats','Morehats','Hats!','Easter','Dabbin','Isaac','Rebirth','Rumble','RumbleStudios','Quests','DefildPlays','DefildPlays2','Secret','Icecream','CrainerGamer','Crainer'}
  27. local AutoMine,AutoRebirth,AutoCrate,AfkMine,AutoOre,AutoMineKey,AutoRebirthKey,AfkMineKey,CreateTpKey,TeleportTpKey,DestroyTpKey,TeleportSellKey,OpenCrateKey,DeleteKey,MaxOre = false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false
  28.  
  29. local KeyPressEquiv = mouse1click or leftclick or MOUSE_CLICK or PlaceHolder
  30.  
  31. if Synapse then KeyPressEquiv = Synapse.mouse1click end
  32. if Input then KeyPressEquiv = Input.LeftClick end
  33.  
  34. local network = {
  35. cache = {}
  36. }
  37. function network:Initialize()
  38. local id = 0
  39. local runs = 0
  40. function key()
  41. id = id + 1
  42. if id > 100 then
  43. id = 0
  44. end
  45. return 2654 * (id * 3)
  46. end
  47. function network.new()
  48. local remote, func = game.ReplicatedStorage.Network:InvokeServer()
  49. runs = runs + 1
  50. if runs >= 2 then
  51. self:FireServer("KickSelf", "Bypassing Network")
  52. end
  53. network.RemoteEvent = remote
  54. network.RemoteFunction = func
  55. end
  56. network.new()
  57. function network:Cache(name, func)
  58. if not self.cache[name] then
  59. self.cache[name] = func
  60. else
  61. warn("Function '" .. name .. "' has previous cache.")
  62. end
  63. end
  64. function network:Function(name, ...)
  65. if not network.init then
  66. repeat
  67. wait(0.25)
  68. until network.init
  69. end
  70. if not self.cache[name] then
  71. warn("Function " .. name .. " has not been cached yet")
  72. else
  73. return self.cache[name](...)
  74. end
  75. end
  76. function network:FireServer(name, ...)
  77. self.RemoteEvent:FireServer(name, {
  78. {
  79. ...
  80. }
  81. }, key())
  82. end
  83. function network:InvokeServer(name, ...)
  84. return self.RemoteFunction:InvokeServer(name, {
  85. {
  86. ...
  87. }
  88. }, key())
  89. end
  90. function self.RemoteFunction.OnClientInvoke(...)
  91. return self:Function(...)
  92. end
  93. self.RemoteEvent.OnClientEvent:connect(function(...)
  94. self:Function(...)
  95. end)
  96. network.init = true
  97. end
  98. network:Initialize()
  99. function network:FireServer(name, ...)
  100. self.RemoteEvent:FireServer(name, {
  101. {
  102. ...
  103. }
  104. }, key())
  105. end
  106.  
  107. function GetShit()
  108. local coins, inventory, equipped, ownedItems, offer, rebirths, skins, skinEquipped, pets, crates, favorites, hatInventory, wearing, visibleHats, eggHuntStuff, eggPackBought, quests, sortType, patriotBought, tokens, permanentItems, login, toolEnchantments, newQuests, lightPack = network:InvokeServer("GetStats")
  109. return {coins, inventory, equipped, ownedItems, offer, rebirths, skins, skinEquipped, pets, crates, favorites, hatInventory, wearing, visibleHats, eggHuntStuff, eggPackBought, quests, sortType, patriotBought, tokens, permanentItems, login, toolEnchantments, newQuests, lightPack}
  110. end
  111. local atmine = false
  112. function OpenCrates()
  113. if AutoCrate then
  114. local a = {}
  115. for i,v in pairs(GetShit()[10]) do
  116. local crate,num = v[1],v[2]
  117. for i=1,num do
  118. if AutoCrate then
  119. network:FireServer('SpinCrate',crate)
  120. wait(1)
  121. end
  122. end
  123. end
  124. else
  125. return nil
  126. end
  127. end
  128.  
  129. function GenRan()
  130. local txt = ''
  131. for i=1,16 do
  132. local mat_ran = math.random(1,string.len(chars))
  133. txt = txt..chars:sub(mat_ran,mat_ran)
  134. end
  135. return txt
  136. end
  137.  
  138.  
  139. local Frame = sg.drag.frames
  140. local main,misc,settings,Players,Logs,Settings,CloseB = Frame.Main,Frame.Ore,Frame.Keybinds,Frame.Players,Frame.Logs,Frame.Settings,sg.drag.close
  141. main.Visible = true
  142. local MainM = {
  143. main.AutoMine.toggle,
  144. main.AutoRebirth.toggle,
  145. main.AutoCrate.toggle,
  146. main.AfkMine.toggle,
  147. main.RedeemCodes
  148. }
  149. LogsM = {
  150. Logs.Log
  151. }
  152.  
  153. settingsM = {
  154. Settings.wait.txt,
  155. Settings.delete.key,
  156. Settings.delete.toggle,
  157. Settings.maxores.txt,
  158. Settings.maxores.toggle
  159. }
  160. local MiscM = {
  161. misc.AutoOre.toggle,
  162. misc.Ores,
  163. misc.Added,
  164. }
  165. local laspos
  166. settingsM[5].MouseButton1Down:connect(function()
  167. if MaxOre == true then
  168. MaxOre=false
  169. settingsM[5].BackgroundColor3=Color3.new(1,0,0)
  170. else
  171. MaxOre=true
  172. settingsM[5].BackgroundColor3=Color3.new(0,1,0)
  173. end
  174. end)
  175. CloseB.MouseButton1Down:connect(function()
  176. drag:TweenPosition(UDim2.new(1,0,0.5,0),'Out','Sine',.5)
  177. laspos = drag.Position
  178. local open = Instance.new('TextButton',sg)
  179. open.BackgroundColor3=Color3.fromRGB(95, 95, 95)
  180. open.Size = UDim2.new(0,23,0,23)
  181. open.Text = 'O'
  182. open.TextSize = 16
  183. open.Font = 'ArialBold'
  184. open.TextColor3=Color3.new(1,1,1)
  185. open.Position=UDim2.new(1,-23,0.5,-11.5)
  186. open.MouseButton1Down:connect(function()
  187. drag:TweenPosition(laspos,'Out','Sine',.5)
  188. open:Destroy()
  189. end)
  190. end)
  191.  
  192. MiscM[1].MouseButton1Down:connect(function()
  193. if AutoOre then
  194. AutoOre = false
  195. MiscM[1].BackgroundColor3 = Color3.new(1,0,0)
  196. else
  197. AutoOre = true
  198. MiscM[1].BackgroundColor3 = Color3.new(0,1,0)
  199. end
  200. end)
  201. local keybinds = {
  202. ['AutoMine']='key',
  203. ['AutoRebirth']='key',
  204. ['AfkMine']='key',
  205. ['CreateTpPad']='key',
  206. ['TeleportTpPad']='key',
  207. ['DestroyPad']='key',
  208. ['TeleportToSell']='key',
  209. ['OpenCrates']='key',
  210. ['ToggleFreeze']='key',
  211. ['DeleteKey']='key',
  212.  
  213. }
  214. local Lims = {
  215. ['WaitTime']=1200,
  216. ['MaxOres']=10,
  217. }
  218. function isnil(ting)
  219. return ting == nil
  220. end
  221. function IsFull()
  222. local base = player.PlayerGui.ScreenGui.StatsFrame.Inventory.Amount.Text
  223. if base:find'inf' then
  224. return true
  225. end
  226. for i=1,string.len(base) do
  227. if base:sub(i,i) == '/' then
  228. local min,max = base:sub(1,i-1):gsub(',',''),base:sub(i+1):gsub(',','')
  229.  
  230. if MaxOre then
  231. if not isnil(tonumber(settingsM[4].Text)) then
  232. if tonumber(min) >= tonumber(settingsM[4].Text) then
  233. Log'Max Reached'
  234. Log('Current Custom Max: '..settingsM[4].Text)
  235. return false
  236. end
  237. end
  238. end
  239. if tonumber(min) >= tonumber(max) then
  240. return false
  241. else
  242. return true
  243. end
  244. end
  245. end
  246. end
  247. local SettingsM = {
  248. settings.AutoMine.key,
  249. settings.AutoRebirth.key,
  250. settings.AfkMine.key,
  251. settings.CreateTp.key,
  252. settings.TeleportTp.key,
  253. settings.DestroyTp.key,
  254. settings.TpToSell.key,
  255. settings.OpenCrates.key,
  256. settings.Freeze.key,
  257. }
  258. function GetNumm(inp)
  259. if type(inp) == 'number' then
  260. return tonumber(inp)
  261. else
  262. return 1200
  263. end
  264. end
  265. settingsM[1].Changed:connect(function()
  266. Lims ['WaitTime']=GetNumm(settingsM[1].Text)
  267. end)
  268. settingsM[2].Changed:connect(function()
  269. keybinds['DeleteKey']=settingsM[2].Text
  270. end)
  271. settingsM[4].Changed:connect(function()
  272. Lims['MaxOres']=settingsM[4].Text
  273. end)
  274. settingsM[3].MouseButton1Down:connect(function()
  275. if DeleteKey then
  276. DeleteKey=false
  277. else
  278. DeleteKey=true
  279. end
  280. end)
  281. SettingsM[1].Changed:connect(function()
  282. keybinds['AutoMine']=SettingsM[1].Text
  283. end)
  284. SettingsM[2].Changed:connect(function()
  285. keybinds['AutoRebirth']=SettingsM[2].Text
  286. end)
  287. SettingsM[3].Changed:connect(function()
  288. keybinds['AfkMine']=SettingsM[3].Text
  289. end)
  290. SettingsM[4].Changed:connect(function()
  291. keybinds['CreateTpPad']=SettingsM[4].Text
  292. end)
  293. SettingsM[5].Changed:connect(function()
  294. keybinds['TeleportTpPad']=SettingsM[5].Text
  295. end)
  296. SettingsM[6].Changed:connect(function()
  297. keybinds['DestroyPad']=SettingsM[6].Text
  298. end)
  299. SettingsM[7].Changed:connect(function()
  300. keybinds['TeleportToSell']=SettingsM[7].Text
  301. end)
  302. SettingsM[8].Changed:connect(function()
  303. keybinds['OpenCrates']=SettingsM[8].Text
  304. end)
  305. SettingsM[9].Changed:connect(function()
  306. keybinds['ToggleFreeze']=SettingsM[9].Text
  307. end)
  308. local guipos
  309. local drag = sg.drag
  310. local MainB,OreB,KeyB,PlayB,LogB,SettB=drag.buttons.main,drag.buttons.tpore,drag.buttons.keybinds,drag.buttons.plrs,drag.buttons.logs,drag.buttons.settings
  311. MainB.MouseButton1Down:connect(function()
  312. main.Visible = true
  313. settings.Visible = false
  314. Players.Visible = false
  315. misc.Visible = false
  316. Logs.Visible = false
  317. Settings.Visible = false
  318. end)
  319. main.Visible = true
  320. settings.Visible = false
  321. Players.Visible = false
  322. misc.Visible = false
  323. Logs.Visible = false
  324. Settings.Visible = false
  325. OreB.MouseButton1Down:connect(function()
  326. main.Visible = false
  327. settings.Visible = false
  328. Players.Visible = false
  329. misc.Visible = true
  330. Logs.Visible = false
  331. Settings.Visible = false
  332. end)
  333. KeyB.MouseButton1Down:connect(function()
  334. main.Visible = false
  335. settings.Visible = true
  336. Players.Visible = false
  337. misc.Visible = false
  338. Logs.Visible = false
  339. Settings.Visible = false
  340. end)
  341. PlayB.MouseButton1Down:connect(function()
  342. main.Visible = false
  343. settings.Visible = false
  344. Players.Visible = true
  345. misc.Visible = false
  346. Logs.Visible = false
  347. Settings.Visible = false
  348. end)
  349. LogB.MouseButton1Down:connect(function()
  350. main.Visible = false
  351. settings.Visible = false
  352. Players.Visible = false
  353. misc.Visible = false
  354. Logs.Visible = true
  355. Settings.Visible = false
  356. end)
  357. SettB.MouseButton1Down:connect(function()
  358. main.Visible = false
  359. settings.Visible = false
  360. Players.Visible = false
  361. misc.Visible = false
  362. Logs.Visible = false
  363. Settings.Visible = true
  364. end)
  365. local mines = {
  366. ['Earth']=Vector3.new(1,13.4,5),
  367. ['Candy']=Vector3.new(30,12,3036),
  368. ['Toy']=Vector3.new(36,13,5669),
  369. ['Food']=Vector3.new(35.45,13,8748.03),
  370. ['Dino']=Vector3.new(30,12,10524),
  371. ['Atlantis']=Vector3.new(35.5,13,11939),
  372. ['Beach']=Vector3.new(29,12,14345),
  373. ['Vip']=Vector3.new(0,13,-1229),
  374.  
  375. }
  376. function TpToMine()
  377. Log'Teleporting To Mine'
  378. if player.Character.HumanoidRootPart.Position.Z > game.Workspace.BeachPosition.Value.Z then
  379. Tp(mines["Beach"])
  380. elseif player.Character.HumanoidRootPart.Position.Z > game.Workspace.SeaPosition.Value.Z then
  381. Tp(mines["Atlantis"])
  382. elseif player.Character.HumanoidRootPart.Position.Z > game.Workspace.DinoPosition.Value.Z then
  383. Tp(mines["Dino"])
  384. elseif player.Character.HumanoidRootPart.Position.Z > game.Workspace.FoodPosition.Value.Z then
  385. Tp(mines["Food"])
  386. elseif player.Character.HumanoidRootPart.Position.Z > game.Workspace.ToyPosition.Value.Z then
  387. Tp(mines["Toy"])
  388. elseif player.Character.HumanoidRootPart.Position.Z > game.Workspace.CandyPosition.Value.Z then
  389. Tp(mines["Candy"])
  390. else
  391. Tp(mines["Earth"])
  392. end
  393. end
  394. function TeleportToPad()
  395. wait(1)
  396. network:FireServer("TeleportToPad")
  397. end
  398. function RemovePad()
  399. network:FireServer("RemovePad")
  400. end
  401. function TeleporterDown()
  402. if char.Parent:FindFirstChild(player.Name..'Teleporter',true) then
  403. return true
  404. else
  405. return false
  406. end
  407. end
  408. function PlaceTeleport(item)
  409. if TeleporterDown() then
  410. RemovePad()
  411. wait(0.1)
  412. player.PlayerGui.ScreenGui.ClientScript.Event:Fire("PlaceTeleporter", item.CFrame)
  413. else
  414. player.PlayerGui.ScreenGui.ClientScript.Event:Fire("PlaceTeleporter", item.CFrame)
  415. end
  416.  
  417. player.PlayerGui.ScreenGui.ClientScript.Event:Fire("PlaceTeleporter", item.CFrame)
  418. end
  419. function TpToBlock(block)
  420. local isBlock = workspace.Blocks:FindFirstChild(block, true)
  421. local primary = isBlock.PrimaryPart
  422.  
  423. if primary then
  424. PlaceTeleport(primary)
  425. wait(0.5)
  426. TeleportToPad()
  427. end
  428. end
  429. function UpdateOres()
  430. for i,v in pairs(workspace.Blocks:GetChildren()) do
  431. local scroll = MiscM[2]
  432. if not scroll:FindFirstChild(v.Name) then
  433. local ting = Instance.new('TextButton',scroll)
  434. ting.Size = UDim2.new(1,0,0,20)
  435. ting.Position = UDim2.new(0,0,0,(#scroll:GetChildren()-1)*20)
  436. ting.Text = v.Name
  437. ting.Name = v.Name
  438. ting.TextColor3=Color3.new(1,1,1)
  439. ting.BorderColor3=Color3.new(1,1,1)
  440. ting.BackgroundColor3=Color3.fromRGB(112, 112, 112)
  441. scroll.CanvasSize = UDim2.new(0,166,0,#scroll:GetChildren()*25+20)
  442. ting.MouseButton1Down:connect(function()
  443. local ting = Instance.new('TextButton',MiscM[3])
  444. ting.Size = UDim2.new(1,0,0,20)
  445. ting.Position = UDim2.new(0,0,0,(#MiscM[3]:GetChildren()-1)*20)
  446. ting.BackgroundColor3=Color3.fromRGB(112, 112, 112)
  447. MiscM[3].CanvasSize = UDim2.new(0,166,0,#scroll:GetChildren()*20+20)
  448. ting.Name = v.Name
  449. ting.Text = v.Name
  450. ting.TextColor3=Color3.new(1,1,1)
  451. ting.BorderColor3=Color3.new(1,1,1)
  452. ting.MouseButton1Down:connect(function()
  453. ting:Destroy()
  454. end)
  455. end)
  456. end
  457. end
  458. end
  459. function round(n)
  460. return math.floor(n + 0.5)
  461. end
  462.  
  463. function Tp(pos)
  464. _G.Tp = false
  465. local startpos = char.Head.CFrame
  466. local Distance = (pos - char.Head.Position).Magnitude
  467. local Skips = round(Distance/2)
  468. local VectorToSkip = (pos - char.Head.Position)/Skips
  469. local i = 0
  470. _G.Tp = true
  471. while i ~= Skips do
  472. if _G.Tp == false then
  473. break
  474. end
  475. char.HumanoidRootPart.Velocity = Vector3.new(0,0,0)
  476. startpos = startpos + VectorToSkip
  477. char.HumanoidRootPart.CFrame = (startpos)
  478. i = i + 1
  479. char.HumanoidRootPart.Velocity = Vector3.new(0,0,0)
  480. wait()
  481. end
  482. end
  483. MainM[1].MouseButton1Down:connect(function()
  484. if AutoMine == false then
  485. AutoMine = true
  486. MainM[1].BackgroundColor3 = Color3.new(0,1,0)
  487. else
  488. AutoMine = false
  489. MainM[1].BackgroundColor3 = Color3.new(1,0,0)
  490. end
  491. end)
  492. MainM[2].MouseButton1Down:connect(function()
  493. if AutoRebirth == false then
  494. AutoRebirth = true
  495. MainM[2].BackgroundColor3 = Color3.new(0,1,0)
  496. else
  497. AutoRebirth = false
  498. MainM[2].BackgroundColor3 = Color3.new(1,0,0)
  499. end
  500. end)
  501. MainM[3].MouseButton1Down:connect(function()
  502. if AutoCrate == false then
  503. AutoCrate = true
  504. MainM[3].BackgroundColor3 = Color3.new(0,1,0)
  505. else
  506. AutoCrate = false
  507. MainM[3].BackgroundColor3 = Color3.new(1,0,0)
  508. end
  509. end)
  510.  
  511. MainM[4].MouseButton1Down:connect(function()
  512. if AfkMine == false then
  513. AfkMine = true
  514. atmine = false
  515. MainM[4].BackgroundColor3 = Color3.new(0,1,0)
  516. else
  517. AfkMine = false
  518. MainM[4].BackgroundColor3 = Color3.new(1,0,0)
  519. end
  520. end)
  521. drag.Draggable = true
  522. local frozen = false
  523. function FreezeChar()
  524. if frozen then
  525. frozen = false
  526. for i,v in pairs(char:GetChildren()) do
  527. if v:IsA'BasePart' then
  528. v.Anchored = false
  529. end
  530. end
  531. else
  532. frozen = true
  533. for i,v in pairs(char:GetChildren()) do
  534. if v:IsA'BasePart' then
  535. v.Anchored = true
  536. end
  537. end
  538. end
  539. end
  540. function teleportToSell()
  541. paused = true
  542. wait(1)
  543. local zone
  544. if player.Character.HumanoidRootPart.Position.Z > game.Workspace.BeachPosition.Value.Z then
  545. network:FireServer("MoveTo", "BeachSell")
  546. elseif player.Character.HumanoidRootPart.Position.Z > game.Workspace.SeaPosition.Value.Z then
  547. network:FireServer("MoveTo", "SeaSell")
  548. elseif player.Character.HumanoidRootPart.Position.Z > game.Workspace.DinoPosition.Value.Z then
  549. network:FireServer("MoveTo", "DinoSell")
  550. elseif player.Character.HumanoidRootPart.Position.Z > game.Workspace.FoodPosition.Value.Z then
  551. network:FireServer("MoveTo", "FoodSell")
  552. elseif player.Character.HumanoidRootPart.Position.Z > game.Workspace.ToyPosition.Value.Z then
  553. network:FireServer("MoveTo", "ToySell")
  554. elseif player.Character.HumanoidRootPart.Position.Z > game.Workspace.CandyPosition.Value.Z then
  555. zone = "Candy"
  556. network:FireServer("MoveTo", "CandySell")
  557. elseif player.Character.HumanoidRootPart.Position.Z > game.Workspace.SpacePosition.Value.Z then
  558. zone = "Space"
  559. network:FireServer("MoveTo", "SpaceSell")
  560. else
  561. zone = "Earth"
  562. network:FireServer("MoveTo", "SellSpawn")
  563. end
  564. wait(2)
  565. paused = false
  566. end
  567. mouse.KeyDown:connect(function(key)
  568. for i,v in pairs(keybinds) do
  569. if v:lower() == key:lower() then
  570. if i == 'AutoMine' then
  571. if AutoMine then
  572. AutoMine = false
  573. else
  574. AutoMine = true
  575. end
  576. elseif i == 'AutoRebirth' then
  577. if AutoRebirth then
  578. AutoRebirth = false
  579. else
  580. AutoRebirth = true
  581. end
  582. elseif i == 'AfkMine' then
  583. if AfkMine then
  584. AfkMine = false
  585. else
  586. AfkMine = true
  587. end
  588. elseif i == 'CreateTpPad' then
  589. PlaceTeleport(char.LowerTorso)
  590. elseif i == 'TeleportToPad' then
  591. TeleportToPad()
  592. elseif i == 'DestroyPad' then
  593. RemovePad()
  594. elseif i == 'TeleportToSell' then
  595. teleportToSell()
  596. elseif i == 'OpenCrates' then
  597. if AutoCrate then
  598. AutoCrate = false
  599. else
  600. AutoCrate = true
  601. end
  602. elseif i == 'ToggleFreeze' then
  603. FreezeChar()
  604. end
  605. end
  606. end
  607. end)
  608. local added = {}
  609. local check = math.huge
  610. function findFirstParent(obj, parent)
  611. local function find(current)
  612. if not isnil(current) and current.Parent == parent then
  613. return current
  614. elseif not isnil(current) and current.Parent == game then
  615. return nil
  616. elseif not isnil(current) then
  617. return find(current.Parent)
  618. end
  619. end
  620. return find(obj)
  621. end
  622. function MineBlock()
  623. local targ
  624. pcall(function()
  625. targ = mouse.Target
  626. if (mouse.Target.Position - Character.Head.Position).Magnitude <= 20 then
  627. local IsBlock = findFirstParent(targ, game.Workspace.Blocks)
  628. if IsBlock then
  629. network:FireServer('MineBlock',IsBlock)
  630. end
  631. end
  632. end)
  633. end
  634. function MineBlock2(block)
  635. local targ = block.PrimaryPart
  636. local IsBlock = findFirstParent(targ, game.Workspace.Blocks)
  637. if (targ.Position - Character.Head.Position).Magnitude <= 20 then
  638. network:FireServer('MineBlock',IsBlock)
  639. end
  640. end
  641. function MineBlock3(block)
  642. pcall(function()
  643. if not (block == nil) then
  644. local targ = block
  645. local IsBlock = findFirstParent(targ, game.Workspace.Blocks)
  646. if IsBlock then
  647. network:FireServer('MineBlock',IsBlock)
  648. end
  649. end
  650. end)
  651. end
  652. MainM[5].MouseButton1Down:connect(function()
  653. for i,v in pairs(codes) do
  654. wait(1.5)
  655. network:FireServer('RedeemCode',v)
  656. Log('Redeeming code: '..v)
  657. end
  658. end)
  659. function Rebirth()
  660. paused = true
  661. wait(.5)
  662. network:FireServer('Rebirth')
  663. paused =false
  664. end
  665. local LogFolder = Logs.Log
  666. function Log(info)
  667. local Info = Instance.new('TextLabel',LogFolder)
  668. Info.Name = info
  669. Info.TextColor3=Color3.new(1,1,1)
  670. Info.BorderColor3 = Color3.new(1,1,1)
  671. Info.Text = tostring(info)
  672. Info.Size = UDim2.new(0,347,0,20)
  673. Info.Parent = LogFolder
  674. Info.Visible=true
  675. Info.ZIndex=10
  676. Info.Position = UDim2.new(0,0,0,(#LogFolder:GetChildren()-1)*20)
  677. Info.BackgroundColor3=Color3.fromRGB(112, 112, 112)
  678. Info.Visible=true
  679. LogFolder.CanvasSize = UDim2.new(1,0,0,#LogFolder:GetChildren()*20+25)
  680.  
  681. end
  682.  
  683. for i,v in pairs(sg:GetDescendants()) do
  684. v.Name = GenRan()
  685. end
  686. sg.Name = GenRan()
  687. local check = 1200
  688. local waits = 0
  689. local function callback(text)
  690. if text == "Ok" then
  691. end
  692. end
  693. local bindableFunction = Instance.new("BindableFunction")
  694. bindableFunction.OnInvoke = callback
  695. game.StarterGui:SetCore("SendNotification", {
  696. Title = "Thanks for choosing my GUI :)"; -- Required. Has to be a string!
  697. Text = "If you have any problems, please join the discord posted on the thread!"; -- Required. Has to be a string!
  698. Icon = ""; -- Optional, defaults to "" (no icon)
  699. Duration = 5; -- Optional, defaults to 5 seconds
  700. Callback = bindableFunction; -- Optional, gets invoked with the text of the button the user pressed
  701. Button1 = "Ok"; -- Optional, makes a button appear with the given text that, when clicked, fires the Callback if it's given
  702. })
  703.  
  704. game:GetService('RunService').RenderStepped:connect(function()
  705. check = check +1
  706. if check > 1200 then
  707. UpdateOres()
  708. check = 0
  709. end
  710. if AutoMine then
  711. if not paused and workspace:FindFirstChild('Collapse') == nil then
  712. if IsFull() then
  713. wait(1)
  714. MineBlock()
  715. else
  716. teleportToSell()
  717. end
  718. end
  719. end
  720. end)
  721. local PartStandingOn
  722. char.LeftFoot.Touched:connect(function(toucher)
  723. PartStandingOn = toucher
  724. end)
  725. char.RightFoot.Touched:connect(function(toucher)
  726. PartStandingOn = toucher
  727. end)
  728.  
  729. function IsCollapsed()
  730. return workspace:FindFirstChild'Collapsed' == nil
  731. end
  732. local waiting = false
  733. local clickdelay = 0
  734. while wait() do
  735. clickdelay = clickdelay+1
  736. waits = waits + 1
  737. if AutoOre then
  738. paused = true
  739. if IsFull() then
  740. for i,v in pairs(MiscM[3]:GetChildren()) do
  741. wait()
  742. if workspace.Blocks:FindFirstChild(v.Name) then
  743. wait()
  744. pcall(function()
  745. if IsFull() and AutoOre then
  746. wait()
  747. if workspace.Blocks:FindFirstChild(v.Name) then
  748. local block = workspace.Blocks:FindFirstChild(v.Name)
  749. Log'Creating Teleporting'
  750. PlaceTeleport(block.PrimaryPart)
  751. wait(1)
  752. Log'Teleporting, and freezing character'
  753. TeleportToPad()
  754. for i,v in pairs(char:GetChildren()) do
  755. if v:IsA'BasePart' then
  756. v.Anchored = true
  757. end
  758. end
  759. wait(1)
  760. Log('Mining Block '..block.Name)
  761. MineBlock2(block)
  762. Log'Unfreezing Char'
  763. for i,v in pairs(char:GetChildren()) do
  764. if v:IsA'BasePart' then
  765. v.Anchored = false
  766. end
  767. end
  768. end
  769. end
  770.  
  771. end)
  772. end
  773. end
  774. else
  775. teleportToSell()
  776. end
  777. paused = false
  778. end
  779. if AutoCrate then
  780. OpenCrates()
  781. end
  782. if AutoRebirth then
  783. if waits > 120 then
  784. Rebirth()
  785. waits = 0
  786. end
  787. end
  788. if AfkMine then
  789. if not IsCollapsed() then
  790. if atmine then
  791. if clickdelay > 120 then
  792. KeyPressEquiv()
  793. clickdelay = 0
  794. end
  795. if IsFull() and PartStandingOn ~= nil then
  796. pcall(function()
  797. MineBlock3(PartStandingOn.Parent)
  798. end)
  799. elseif not IsFull() then
  800. teleportToSell()
  801. atmine = false
  802. end
  803. else
  804. atmine = true
  805. TpToMine()
  806. wait()
  807. char.HumanoidRootPart.Velocity = Vector3.new(15,-15,15)
  808. end
  809. else
  810. atmine = false
  811. wait()
  812. end
  813. end
  814. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement