Advertisement
SNAKERBLX

Untitled

Apr 28th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. --[[
  2. @ Scripted by Otaku
  3. @ Fixed by Sploit
  4. @ 4/28/2018
  5. --]]
  6. local plr = game.Players.LocalPlayer
  7. local leaderstats = plr:WaitForChild("leaderstats")
  8. local rebirthValue = ((leaderstats.Rebirths.Value + 1) * 10000000)
  9. local coins = string.gsub(leaderstats.Coins.Value, ",", "") -- Coin error fix
  10.  
  11.  
  12. local function NewRayMine(vectorValue)
  13. local ray = Ray.new(
  14. plr.Character.HumanoidRootPart.Position,
  15. vectorValue
  16. )
  17. local ignore = {plr.Character}
  18. local part, endPoint = workspace:FindPartOnRayWithIgnoreList(ray, ignore)
  19.  
  20. if part then
  21. print(part)
  22. for i = 1, 50 do
  23. workspace.RemoteEvent:FireServer("MineBlock", part.Parent)
  24. wait()
  25. end
  26. end
  27. end
  28.  
  29. local pickPrices = {
  30. [2] = 25,
  31. [3] = 75,
  32. [4] = 250,
  33. [5] = 600,
  34. [6] = 2000,
  35. [7] = 6000,
  36. [8] = 16500,
  37. [9] = 32000,
  38. [10] = 78000,
  39. [11] = 120000,
  40. [16] = 400000,
  41. [17] = 520000,
  42. [18] = 775000,
  43. [19] = 1100000,
  44. [20] = 2450000,
  45. [21] = 2e9
  46. }
  47.  
  48. local pick = 4
  49. local buyingPick = true
  50.  
  51. local function buyPick()
  52. if buyingPick then
  53. if pickPrices[pick] < tonumber(coins) then
  54. workspace.RemoteEvent:FireServer("BuyItem", "Tools", pick)
  55. pick = pick + 1
  56. buyingPick = false
  57. end
  58. elseif buyingPick ~= true then
  59. if pick == 12 then
  60. pick = 16
  61. end
  62. buyingPick = true
  63. end
  64. end
  65.  
  66. local function Sell()
  67. local var = plr.Character.HumanoidRootPart.CFrame
  68. plr.Character.HumanoidRootPart.CFrame = workspace.Activation.Sell.CFrame * CFrame.new(0,5,0)
  69. wait(2)
  70. plr.Character.HumanoidRootPart.CFrame = var
  71. wait(5)
  72. end
  73.  
  74. local function rebirthMine()
  75. if tonumber(coins) < rebirthValue then
  76. NewRayMine(Vector3.new(0, -5, 0))
  77. NewRayMine(Vector3.new(5, 0, 0))
  78. NewRayMine(Vector3.new(-5, 0, 0))
  79. NewRayMine(Vector3.new(0, 0, 5))
  80. NewRayMine(Vector3.new(0, 0, -5))
  81. else
  82. workspace.RemoteEvent:FireServer("Rebirth")
  83. rebirthValue = ((leaderstats.Rebirths.Value + 1) * 10000000)
  84. end
  85. end
  86.  
  87. while wait() do
  88. rebirthMine()
  89. buyPick()
  90. Sell()
  91. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement