Advertisement
Guest User

Mining Simulator 1 Rebirth Script (OP!)

a guest
Mar 25th, 2024
1,461
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.09 KB | None | 0 0
  1. getgenv().Name = “uwucat612"
  2.  
  3. task.wait(2)
  4.  
  5. local virtual = game:GetService("VirtualUser")
  6.  
  7. game:GetService("Players").LocalPlayer.Idled:Connect(function()
  8.  
  9. virtual:CaptureController()
  10.  
  11. virtual:ClickButton2(Vector2.new())
  12.  
  13. end)
  14.  
  15. local LocalPlayer = game.Players.LocalPlayer
  16.  
  17. local Character = LocalPlayer.Character
  18.  
  19. local HumanoidRootPart = Character:FindFirstChild("HumanoidRootPart")
  20.  
  21. local Path1 = Instance.new("Part", game:GetService("Workspace"))
  22.  
  23. Character.Head.CustomPlayerTag.PlayerName.Text = getgenv().Name
  24.  
  25. Character.Head.CustomPlayerTag.MinerRank.Text = "G.O.A.T🐐"
  26.  
  27. local Depth;
  28.  
  29. local SellTreshold;
  30.  
  31.  
  32.  
  33. if not getgenv().SellTreshold then
  34.  
  35. SellTreshold = 40000
  36.  
  37. else
  38.  
  39. SellTreshold = getgenv().SellTreshold;
  40.  
  41. end
  42.  
  43. if not getgenv().Depth then
  44.  
  45. Depth = 135
  46.  
  47. else
  48.  
  49. Depth = getgenv().Depth;
  50.  
  51. end
  52.  
  53. local objectsToRemove = {workspace.VIPMine:GetChildren()[13],workspace.Activation.Buy,workspace.VIPMine.Anvil,workspace.PrivateMinePart2,workspace.PrivateMinePart};
  54.  
  55. for _, object in ipairs(objectsToRemove) do
  56.  
  57. if object then
  58.  
  59. object:Destroy();
  60.  
  61. end
  62.  
  63. end
  64.  
  65. do
  66.  
  67. repeat
  68.  
  69. wait();
  70.  
  71. until game:IsLoaded()
  72.  
  73. game:GetService("Players").LocalPlayer.PlayerGui:WaitForChild("ScreenGui");
  74.  
  75. while game:GetService("Players").LocalPlayer.PlayerGui.ScreenGui.LoadingFrame.BackgroundTransparency == 0 do
  76.  
  77. for i, connection in pairs(getconnections(game:GetService("Players").LocalPlayer.PlayerGui.ScreenGui.LoadingFrame.Quality.LowQuality.MouseButton1Down)) do
  78.  
  79. connection:Fire();
  80.  
  81. end
  82.  
  83. wait();
  84.  
  85. end
  86.  
  87. while true do
  88.  
  89. if pcall(function()
  90.  
  91. game.Players.LocalPlayer.leaderstats:WaitForChild("Blocks Mined");
  92.  
  93. end) then
  94.  
  95. if pcall(function()
  96.  
  97. game.Players.LocalPlayer.PlayerGui.ScreenGui.StatsFrame.Coins:FindFirstChild("Amount");
  98.  
  99. end) then
  100.  
  101. if (game.Players.LocalPlayer.PlayerGui.ScreenGui.StatsFrame.Tokens.Amount.Text ~= "Loading...") then
  102.  
  103. break;
  104.  
  105. end
  106.  
  107. end
  108.  
  109. end
  110.  
  111. wait(1);
  112.  
  113. end
  114.  
  115. game:GetService("Players").LocalPlayer.PlayerGui.ScreenGui.TeleporterFrame:Destroy();
  116.  
  117. game:GetService("Players").LocalPlayer.PlayerGui.ScreenGui.StatsFrame.Sell:Destroy();
  118.  
  119. end
  120.  
  121. local vuAF = game:GetService("VirtualUser");
  122.  
  123. game:GetService("Players").LocalPlayer.Idled:connect(function()
  124.  
  125. vuAF:Button2Down(Vector2.new(0, 0), workspace.CurrentCamera.CFrame);
  126.  
  127. wait(1);
  128.  
  129. vuAF:Button2Up(Vector2.new(0, 0), workspace.CurrentCamera.CFrame);
  130.  
  131. end);
  132.  
  133. local Remote;
  134.  
  135. Workspace.Collapsed.Changed:connect(function()
  136.  
  137. if (Workspace.Collapsed.Value == true) then
  138.  
  139. local ts = game:GetService("TeleportService");
  140.  
  141. local p = game:GetService("Players").LocalPlayer;
  142.  
  143. ts:Teleport(game.PlaceId, p);
  144.  
  145. end
  146.  
  147. end);
  148.  
  149. do
  150.  
  151. local Data = getsenv(game:GetService("Players").LocalPlayer.PlayerGui.ScreenGui.ClientScript).displayCurrent;
  152.  
  153. local Values = getupvalue(Data, 8);
  154.  
  155. Remote = Values.RemoteEvent;
  156.  
  157. Data, Values = nil;
  158.  
  159. end
  160.  
  161. do
  162.  
  163. local HumanoidRootPart = game.Players.LocalPlayer.Character.HumanoidRootPart;
  164.  
  165. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0;
  166.  
  167. game.Players.LocalPlayer.Character.Humanoid.JumpPower = 0;
  168.  
  169. HumanoidRootPart.Anchored = true;
  170.  
  171. Remote:FireServer("MoveTo", {{"LavaSpawn"}});
  172.  
  173. local className = "Part";
  174.  
  175. local parent = game.Workspace;
  176.  
  177. local part = Instance.new(className, parent);
  178.  
  179. part.Anchored = true;
  180.  
  181. part.Size = Vector3.new(10, 0.5, 100);
  182.  
  183. part.Material = "ForceField";
  184.  
  185. local pos = Vector3.new(21, 9.5, 26285);
  186.  
  187. part.Position = pos;
  188.  
  189. wait(1);
  190.  
  191. HumanoidRootPart.Anchored = false;
  192.  
  193. while HumanoidRootPart.Position.Z > 26220 do
  194.  
  195. HumanoidRootPart.CFrame = CFrame.new(Vector3.new(HumanoidRootPart.Position.X, 13.05, HumanoidRootPart.Position.Z - 0.5));
  196.  
  197. wait();
  198.  
  199. end
  200.  
  201. HumanoidRootPart.CFrame = CFrame.new(18, 10, 26220);
  202.  
  203. end
  204.  
  205. do
  206.  
  207. local function Split(s, delimiter)
  208.  
  209. result = {};
  210.  
  211. for match in (s .. delimiter):gmatch("(.-)" .. delimiter) do
  212.  
  213. table.insert(result, match);
  214.  
  215. end
  216.  
  217. return result;
  218.  
  219. end
  220.  
  221. local RunService = game:GetService("RunService").Stepped;
  222.  
  223. local HumanoidRootPart = game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart");
  224.  
  225. local depth = Split(game.Players.LocalPlayer.PlayerGui.ScreenGui.TopInfoFrame.Depth.Text, " ");
  226.  
  227. while tonumber(depth[1]) < Depth do
  228.  
  229. local min = HumanoidRootPart.CFrame + Vector3.new(-1, -10, -1);
  230.  
  231. local max = HumanoidRootPart.CFrame + Vector3.new(1, 0, 1);
  232.  
  233. local region = Region3.new(min.Position, max.Position);
  234.  
  235. local parts = workspace:FindPartsInRegion3WithWhiteList(region, {game.Workspace.Blocks}, 5);
  236.  
  237. for each, block in pairs(parts) do
  238.  
  239. Remote:FireServer("MineBlock", {{block.Parent}});
  240.  
  241. RunService:Wait();
  242.  
  243. end
  244.  
  245. depth = Split(game.Players.LocalPlayer.PlayerGui.ScreenGui.TopInfoFrame.Depth.Text, " ");
  246.  
  247. wait();
  248.  
  249. end
  250.  
  251. end
  252.  
  253. do
  254.  
  255. local CoinsAmount = game.Players.LocalPlayer.leaderstats.Coins;
  256.  
  257. local function GetCoinsAmount()
  258.  
  259. local Amount = CoinsAmount.Value;
  260.  
  261. Amount = Amount:gsub(",", "");
  262.  
  263. return tonumber(Amount);
  264.  
  265. end
  266.  
  267. local function comma_value(amount)
  268.  
  269. local formatted = amount;
  270.  
  271. while true do
  272.  
  273. formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", "%1,%2");
  274.  
  275. if (k == 0) then
  276.  
  277. break;
  278.  
  279. end
  280.  
  281. end
  282.  
  283. return formatted;
  284.  
  285. end
  286.  
  287. local function Split(s, delimiter)
  288.  
  289. result = {};
  290.  
  291. for match in (s .. delimiter):gmatch("(.-)" .. delimiter) do
  292.  
  293. table.insert(result, match);
  294.  
  295. end
  296.  
  297. return result;
  298.  
  299. end
  300.  
  301. local recovering = false;
  302.  
  303. local DepthAmount = game.Players.LocalPlayer.PlayerGui.ScreenGui.TopInfoFrame.Depth;
  304.  
  305. DepthAmount.Changed:connect(function()
  306.  
  307. local depth = Split(DepthAmount.Text, " ");
  308.  
  309. if (tonumber(depth[1]) >= 700) then
  310.  
  311. recovering = true;
  312.  
  313. local HumanoidRootPart = game.Players.LocalPlayer.Character.HumanoidRootPart;
  314.  
  315. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0;
  316.  
  317. game.Players.LocalPlayer.Character.Humanoid.JumpPower = 0;
  318.  
  319. HumanoidRootPart.Anchored = true;
  320.  
  321. Remote:FireServer("MoveTo", {{"LavaSpawn"}});
  322.  
  323. local className = "Part";
  324.  
  325. local parent = game.Workspace;
  326.  
  327. local part = Instance.new(className, parent);
  328.  
  329. part.Anchored = true;
  330.  
  331. part.Size = Vector3.new(10, 0.5, 100);
  332.  
  333. part.Material = "ForceField";
  334.  
  335. local pos = Vector3.new(21, 9.5, 26285);
  336.  
  337. part.Position = pos;
  338.  
  339. wait(1);
  340.  
  341. HumanoidRootPart.Anchored = false;
  342.  
  343. while HumanoidRootPart.Position.Z > 26220 do
  344.  
  345. HumanoidRootPart.CFrame = CFrame.new(Vector3.new(HumanoidRootPart.Position.X, 13.05, HumanoidRootPart.Position.Z - 0.5));
  346.  
  347. wait();
  348.  
  349. end
  350.  
  351. HumanoidRootPart.CFrame = CFrame.new(18, 10, 26220);
  352.  
  353. wait(5);
  354.  
  355. recovering = false;
  356.  
  357. end
  358.  
  359. end);
  360.  
  361. local RebirthsAmount = game.Players.LocalPlayer.leaderstats.Rebirths;
  362.  
  363. game:GetService("RunService"):BindToRenderStep("Rebirth", Enum.RenderPriority.Camera.Value, function()
  364.  
  365. while GetCoinsAmount() >= (10000000 * (RebirthsAmount.Value + 1)) do
  366.  
  367. Remote:FireServer("Rebirth", {{}});
  368.  
  369. wait();
  370.  
  371. end
  372.  
  373. end);
  374.  
  375. local InventoryAmount = game.Players.LocalPlayer.PlayerGui.ScreenGui.StatsFrame2.Inventory.Amount;
  376.  
  377. local function GetInventoryAmount()
  378.  
  379. local Amount = InventoryAmount.Text;
  380.  
  381. Amount = Amount:gsub("%s+", "");
  382.  
  383. Amount = Amount:gsub(",", "");
  384.  
  385. local Inventory = Amount:split("/");
  386.  
  387. return tonumber(Inventory[1]);
  388.  
  389. end
  390.  
  391. local RunService = game:GetService("RunService").Stepped;
  392.  
  393. local HumanoidRootPart = game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart");
  394.  
  395. local Character = game.Players.LocalPlayer.Character;
  396.  
  397. local SellArea = CFrame.new(41.96064, 15.8550873, -1239.64648, 1, 0, 0, 0, 1, 0, 0, 0, 1);
  398.  
  399. while true do
  400.  
  401. if HumanoidRootPart then
  402.  
  403. local minp = HumanoidRootPart.CFrame + Vector3.new(-10, -10, -10);
  404.  
  405. local maxp = HumanoidRootPart.CFrame + Vector3.new(10, 10, 10);
  406.  
  407. local region = Region3.new(minp.Position, maxp.Position);
  408.  
  409. local parts = workspace:FindPartsInRegion3WithWhiteList(region, {game.Workspace.Blocks}, 100);
  410.  
  411. for each, block in pairs(parts) do
  412.  
  413. if block:IsA("BasePart") then
  414.  
  415. Remote:FireServer("MineBlock", {{block.Parent}});
  416.  
  417. repeat
  418.  
  419. RunService:Wait();
  420.  
  421. until not recovering
  422.  
  423. end
  424.  
  425. if (GetInventoryAmount() >= SellTreshold) then
  426.  
  427. if Character then
  428.  
  429. if HumanoidRootPart then
  430.  
  431. local SavedPosition = HumanoidRootPart.Position;
  432.  
  433. while GetInventoryAmount() >= SellTreshold do
  434.  
  435. HumanoidRootPart.CFrame = SellArea;
  436.  
  437. Remote:FireServer("SellItems", {{}});
  438.  
  439. RunService:Wait();
  440.  
  441. end
  442.  
  443. HumanoidRootPart.Anchored = true;
  444.  
  445. local starttime1 = os.time();
  446.  
  447. while (HumanoidRootPart.Position - SavedPosition).Magnitude > 1 do
  448.  
  449. HumanoidRootPart.CFrame = CFrame.new(18, SavedPosition.Y, 26220);
  450.  
  451. RunService:Wait();
  452.  
  453. if ((os.time() - starttime1) > 3.5) then
  454.  
  455. break;
  456.  
  457. end
  458.  
  459. end
  460.  
  461. HumanoidRootPart.Anchored = false;
  462.  
  463. end
  464.  
  465. end
  466.  
  467. end
  468.  
  469. end
  470.  
  471. end
  472.  
  473. RunService:Wait();
  474.  
  475. end
  476.  
  477. end
  478.  
  479. if (game.PlaceId == 1417427737) then
  480.  
  481. Script();
  482.  
  483. end
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement