-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathms.lua
210 lines (195 loc) · 8.64 KB
/
ms.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
queueteleport = (syn and syn.queue_on_teleport) or queue_on_teleport or (fluxus and fluxus.queue_on_teleport)
local Players = game:GetService("Players")
local TeleportCheck = false
Players.LocalPlayer.OnTeleport:Connect(function(State)
if queueteleport and (not TeleportCheck) then
TeleportCheck = true
queueteleport("loadstring(game:HttpGet('https://raw.githubusercontent.com/Soul774/Mining-Simulator/main/ms.lua'))()")
end
end)
if game.PlaceId == 1417427737 then repeat task.wait(1) until game:IsLoaded()
local SellTreshold = getgenv().SellTreshold or 30000
local Depth = getgenv().Depth or 205
local Players = game:GetService("Players")
local Client = game.Players.LocalPlayer
local Remote
Players.LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("ScreenGui")
while Players.LocalPlayer.PlayerGui.ScreenGui.LoadingFrame.BackgroundTransparency == 0 do
for i, connection in pairs(getconnections(Players.LocalPlayer.PlayerGui.ScreenGui.LoadingFrame.Quality.LowQuality.MouseButton1Down)) do
connection:Fire()
end
task.wait(1)
end
while true do
if pcall(function() Client.leaderstats:WaitForChild("Blocks Mined") end) then
if pcall(function() Client.PlayerGui.ScreenGui.StatsFrame.Coins:FindFirstChild("Amount") end) then
if Client.PlayerGui.ScreenGui.StatsFrame.Tokens.Amount.Text ~= "Loading..." then
break
end
end
end
task.wait(1)
end
if Players.LocalPlayer.PlayerGui.ScreenGui:FindFirstChild("TeleporterFrame") then
Players.LocalPlayer.PlayerGui.ScreenGui.TeleporterFrame:Destroy()
end
if Players.LocalPlayer.PlayerGui.ScreenGui.StatsFrame:FindFirstChild("Sell") then
Players.LocalPlayer.PlayerGui.ScreenGui.StatsFrame.Sell:Destroy()
end
if Players.LocalPlayer.PlayerGui.ScreenGui.MainButtons:FindFirstChild("Surface") then
Players.LocalPlayer.PlayerGui.ScreenGui.MainButtons.Surface:Destroy()
end
if Players.LocalPlayer.PlayerGui.ScreenGui:FindFirstChild("Collapse") then
Players.LocalPlayer.PlayerGui.ScreenGui.Collapse.Visible = true
end
--Rebirth GUI
local ExampleFrame = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("ScreenGui"):WaitForChild("StatsFrame"):WaitForChild("Inventory")
local Rebirths = game:GetService("Players").LocalPlayer.leaderstats.Rebirths
local Rebirths2 = ExampleFrame:Clone()
Rebirths2.Parent = ExampleFrame.Parent
Rebirths2.Position = UDim2.new(0, 0, 1.5, 15)
Rebirths2.Logo.Image = "rbxassetid://1440681030"
Rebirths2.Amount.Text = tostring(Rebirths.Value)
Rebirths:GetPropertyChangedSignal("Value"):Connect(function()
Rebirths2.Amount.Text = tostring(Rebirths.Value)
end)
--Blocks Mined GUI
local BlocksMined = game:GetService("Players").LocalPlayer.leaderstats["Blocks Mined"]
local BlocksMined2 = ExampleFrame:Clone()
BlocksMined2.Parent = ExampleFrame.Parent
BlocksMined2.Position = UDim2.new(0, 0, 2, 20)
BlocksMined2.Logo.Image = "rbxassetid://10677632570"
BlocksMined2.Amount.Text = tostring(BlocksMined.Value)
BlocksMined:GetPropertyChangedSignal("Value"):Connect(function()
BlocksMined2.Amount.Text = tostring(BlocksMined.Value)
end)
--Reconnect
local po = game.CoreGui.RobloxPromptGui.promptOverlay
po.ChildAdded:connect(function(a)
if a.Name == 'ErrorPrompt' then
repeat
game:GetService("TeleportService"):Teleport(game.PlaceId, Players.LocalPlayer)
task.wait(2)
until false
end
end)
--Rejoin
workspace.Collapsed.Changed:connect(function()
if workspace.Collapsed.Value == true then
game:GetService("TeleportService"):Teleport(game.PlaceId, Players.LocalPlayer)
end
end)
local Data = getsenv(Players.LocalPlayer.PlayerGui.ScreenGui.ClientScript).displayCurrent
local Values = getupvalue(Data,8)
Remote = Values["RemoteEvent"]
Data, Values = nil
local HumanoidRootPart = Client.Character.HumanoidRootPart
local humanoid = Client.Character.Humanoid
humanoid.WalkSpeed = 0
humanoid.JumpPower = 0
HumanoidRootPart.Anchored = true
Remote:FireServer("MoveTo", {{"LavaSpawn"}})
local className = "Part"
local parent = game.Workspace
local part = Instance.new(className, parent)
part.Anchored = true
part.Size = Vector3.new(10, 1 , 100)
part.Material = "ForceField"
local pos = Vector3.new(21, 9.5, 26285)
part.Position = pos
task.wait(1)
HumanoidRootPart.Anchored = false
while HumanoidRootPart.Position.Z > 26220 do
HumanoidRootPart.CFrame = CFrame.new(Vector3.new(HumanoidRootPart.Position.X, 13.05, HumanoidRootPart.Position.Z - 0.5))
task.wait(0.01)
end
HumanoidRootPart.CFrame = CFrame.new(18, 10, 26220)
local function Split(s, delimiter)
result = {};
for match in (s..delimiter):gmatch("(.-)"..delimiter) do
table.insert(result, match);
end
return result;
end
--Dig to depth
local depth = Split(Client.PlayerGui.ScreenGui.TopInfoFrame.Depth.Text," ")
while tonumber(depth[1]) < Depth do
local min = HumanoidRootPart.CFrame + Vector3.new(-1,-10,-1)
local max = HumanoidRootPart.CFrame + Vector3.new(1,0,1)
local region = Region3.new(min.Position, max.Position)
local parts = workspace:FindPartsInRegion3WithWhiteList(region, {game.Workspace.Blocks}, 10)
for _, block in pairs(parts) do
Remote:FireServer("MineBlock",{{block.Parent}})
task.wait()
end
depth = Split(Client.PlayerGui.ScreenGui.TopInfoFrame.Depth.Text," ")
task.wait()
end
local CoinsAmount = Client.leaderstats.Coins
local function GetCoinsAmount()
local Amount = CoinsAmount.Value
Amount = Amount:gsub(',', '')
return tonumber(Amount)
end
--Recover
local Character = Client.Character
local recovering = false
local DepthAmount = Client.PlayerGui.ScreenGui.TopInfoFrame.Depth
DepthAmount.Changed:Connect(function()
task.spawn(function()
local depth = Split(DepthAmount.Text, " ")
if tonumber(depth[1]) >= 1000 and not recovering then
print("recovering true")
HumanoidRootPart.CFrame = CFrame.new(18, Depth, 26220)
print("teleported")
task.wait()
recovering = false
print("recovering false")
end
end)
end)
--Rebirth
local RebirthsAmount = Client.leaderstats.Rebirths
game:GetService("RunService"):BindToRenderStep("Rebirth", Enum.RenderPriority.Camera.Value, function()
while GetCoinsAmount() >= (10000000 * (RebirthsAmount.Value + 1)) do
Remote:FireServer("Rebirth",{{}})
task.wait()
end
end)
local InventoryAmount = Client.PlayerGui.ScreenGui.StatsFrame2.Inventory.Amount
local function GetInventoryAmount()
local Amount = InventoryAmount.Text
Amount = Amount:gsub('%s+', '')
Amount = Amount:gsub(',', '')
local Inventory = Amount:split("/")
return tonumber(Inventory[1])
end
-- Mine Aura + Sell
local Stepped = game:GetService("RunService").Stepped
local RenderStepped = game:GetService("RunService").RenderStepped
local SellArea = CFrame.new(42, 14, -1239)
while Stepped:Wait() do
local minp = HumanoidRootPart.CFrame.Position - Vector3.new(5, 5, 5)
local maxp = HumanoidRootPart.CFrame.Position + Vector3.new(5, 5, 5)
local region = Region3.new(minp, maxp)
local parts = workspace:FindPartsInRegion3WithWhiteList(region, {game.Workspace.Blocks}, 50)
for _, block in ipairs(parts) do
Remote:FireServer("MineBlock", {{block.Parent}})
RenderStepped:Wait()
end
local SavedPosition = HumanoidRootPart.Position
while GetInventoryAmount() >= SellTreshold and not recovering do
Remote:FireServer("SellItems", {{}})
HumanoidRootPart.CFrame = SellArea
Stepped:Wait()
end
local starttime1 = os.time()
while (HumanoidRootPart.Position - SavedPosition).Magnitude > 1 do
HumanoidRootPart.CFrame = CFrame.new(18, SavedPosition.Y, 26220)
RenderStepped:Wait()
if os.time() - starttime1 > 2 then
break
end
end
end
end