Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --!nolint
- --!nocheck
- --!native
- --!optimize 2
- local a
- a = {
- cache = {},
- load = function(b)
- if not a.cache[b] then
- a.cache[b] = { c = a[b]() }
- end
- return a.cache[b].c
- end,
- }
- do
- function a.a()
- local b = {}
- b.__index = b
- function b.new()
- local c = {}
- setmetatable(c, b)
- c.States = {}
- c.CurrentState = nil
- c.StateCounter = 0
- return c
- end
- function b.DefineStates(c, d)
- for e, f in pairs(d) do
- c.States[f.Name] = f
- end
- c.CurrentState = d[1].Name
- end
- function b.GoTo(c, d)
- local e = c.CurrentState
- local f, g = c.States[e], c.States[d]
- if not g then
- return
- end
- c.CurrentState = d
- local h = true
- if g.Enter then
- local i = c.StateCounter
- c.StateCounter += 1
- task.delay(120, function()
- if c.StateCounter == i then
- c.Timeout()
- end
- end)
- warn(`[StateMachine]: Entering: {g.Name}`)
- h = g.Enter(e)
- end
- if h then
- if f.Completed then
- f.Completed()
- end
- else
- c.CurrentState = e
- end
- end
- return b
- end
- function a.b()
- local b = game:GetService("ReplicatedStorage")
- local c, d = (b:WaitForChild("Remotes")), b:WaitForChild("Modules")
- local e = d:WaitForChild("Core")
- local f, g = require((e:WaitForChild("UI"))), {}
- function g.Send(...)
- g.CounterTable.event += 1
- local h = (c:WaitForChild("Send"))
- h:FireServer(g.CounterTable.event, ...)
- end
- function g.UIGet(...)
- return f.get(...)
- end
- function g.Get(...)
- g.CounterTable.func += 1
- local h = (c:WaitForChild("Get"))
- h:InvokeServer(g.CounterTable.func, ...)
- end
- function g.FetchPing()
- return math.max(game:GetService("Stats").Network.ServerStatsItem["Data Ping"]:GetValue() / 1000, 0.2)
- end
- if not g.CounterTable then
- for h, i in pairs(getgc(true)) do
- if typeof(i) == "table" then
- if rawget(i, "event") and rawget(i, "func") then
- g.CounterTable = i
- break
- end
- end
- end
- end
- return g
- end
- function a.c()
- local b, c, d, e, f = game:GetService("PathfindingService"), game:GetService("RunService"), a.load("b"), {}, {}
- f.__index = f
- function f.new(g, h)
- if e[g] then
- return e[g]
- end
- local i = {}
- setmetatable(i, f)
- i.Character = h
- i.Model = g
- i.PathInformation = {
- LastCalibrated = 0,
- BeenOnWaypoint = 0,
- WaypointParts = {},
- WaypointPositions = {},
- CurrentWaypoint = nil,
- Finished = Instance.new("BindableEvent"),
- }
- e[g] = i
- i:Init()
- return i
- end
- function f.VisualizeWaypoint(g, h, i)
- local j = Instance.new("Part", workspace)
- do
- j.Size = Vector3.new(0.3, 0.3, 0.3)
- j.Position = i
- j.Anchored = true
- j.CanCollide = false
- j.Material = Enum.Material.Neon
- j.Color = h.Action == Enum.PathWaypointAction.Jump and Color3.new(1) or Color3.new(0, 1)
- end
- j.Name = "lol"
- table.insert(g.PathInformation.WaypointParts, j)
- end
- function f.DriveToPosition(g, h, i)
- local j, k = g.Model:GetBoundingBox()
- local l =
- b:CreatePath({ AgentHeight = math.ceil(k.Y) - 1, AgentRadius = math.ceil(k.X) - 1, AgentCanJump = true })
- if g.Model.PrimaryPart then
- l:ComputeAsync(g.Model.PrimaryPart.Position, h)
- if l.Status == Enum.PathStatus.Success then
- g:CleanupOldPath()
- g.PathInformation.Initialized = false
- for m, n in pairs(l:GetWaypoints()) do
- local o = n.Position
- if n.Action == Enum.PathWaypointAction.Jump then
- o = o + Vector3.new(0, k.Y + 6, 0)
- end
- g:VisualizeWaypoint(n, o)
- table.insert(g.PathInformation.WaypointPositions, o)
- end
- g.PathInformation.Blocked = l.Blocked:Connect(function() end)
- g.PathInformation.FinalDestination = h
- g.PathInformation.Speed = i
- g.PathInformation.CurrentWaypoint = 0
- g.PathInformation.BeenOnWaypoint = tick()
- g.PathInformation.Initialized = true
- return true
- else
- warn(`There was an error creating a path: {l.Status}`)
- if g.Model.PrimaryPart then
- g.Model.PrimaryPart.CFrame =
- CFrame.new(g.Model.PrimaryPart.Position + Vector3.new(0.1, 0.1, 0.1))
- end
- return false
- end
- end
- return false
- end
- function f.Destroy(g)
- local h = g.Model.PrimaryPart and (g.Model.PrimaryPart:FindFirstChild("BodyVelocity"))
- if h then
- h:Destroy()
- end
- g:CleanupOldPath()
- g.RunConnection:Disconnect()
- end
- function f.GetPrompt(g)
- local h = g.Model.PrimaryPart and (g.Model.PrimaryPart:FindFirstChild("DrivePromptAttachment"))
- local i = h and (h:FindFirstChild("DrivePrompt"))
- return i
- end
- function f.Enter(g)
- if g.Character and g.Character.PrimaryPart then
- g.Character.PrimaryPart.Anchored = false
- end
- local h = g.Model.PrimaryPart and (g.Model.PrimaryPart:FindFirstChild("DrivePromptAttachment"))
- local i = h and (h:FindFirstChild("DrivePrompt"))
- if i then
- fireproximityprompt(i)
- d.Send("lock_vehicle", g.Model, true)
- end
- end
- function f.Sitting(g)
- local h = g:GetPrompt()
- if h then
- return not h.Enabled
- end
- return false
- end
- function f.CleanupOldPath(g)
- table.clear(g.PathInformation.WaypointPositions)
- if g.PathInformation.Blocked then
- g.PathInformation.Blocked:Disconnect()
- end
- for h, i in pairs(workspace:GetChildren()) do
- if i.Name == "lol" then
- i:Destroy()
- end
- end
- table.clear(g.PathInformation.WaypointParts)
- end
- function f.StopDrive(g)
- g.PathInformation.ForceStop = true
- g:CleanupOldPath()
- end
- function f.Exit(g)
- if g.PathInformation.Initialized then
- g:StopDrive()
- end
- d.Get("exit_seat")
- end
- function f.Init(g)
- g.RunConnection = c.Heartbeat:Connect(function()
- if g.PathInformation.Initialized and g.Model.PrimaryPart then
- local h = (g.Model.PrimaryPart:FindFirstChild("BodyVelocity"))
- if
- g.PathInformation.CurrentWaypoint >= #g.PathInformation.WaypointPositions
- or g.PathInformation.ForceStop
- then
- g.PathInformation.Initialized = false
- g.Driving = false
- g.PathInformation.ForceStop = false
- if h then
- h.Velocity = Vector3.zero
- end
- g.PathInformation.Finished:Fire()
- return
- end
- local i = g.PathInformation.WaypointPositions[g.PathInformation.CurrentWaypoint + 1]
- local j, k = (i - g.Model.PrimaryPart.Position), g.Model.PrimaryPart.Size.Magnitude / 2
- local l = k + 2
- if (i - g.Model.PrimaryPart.Position).Magnitude < l then
- g.PathInformation.CurrentWaypoint += 1
- g.PathInformation.BeenOnWaypoint = tick()
- return
- end
- local m = Vector3.new(j.X, 0, j.Z)
- if (tick() - g.PathInformation.BeenOnWaypoint) > 0.5 then
- g:DriveToPosition(g.PathInformation.FinalDestination, g.PathInformation.Speed)
- return
- end
- if not h then
- h = Instance.new("BodyVelocity")
- h.MaxForce = Vector3.new(1e9, 1e9, 1e9)
- h.P = 100000
- h.Parent = g.Model.PrimaryPart
- end
- if m.Magnitude > 0 then
- m = m.Unit
- g.Model.PrimaryPart.CFrame =
- CFrame.lookAt(g.Model.PrimaryPart.Position, g.Model.PrimaryPart.Position + m)
- end
- h.Velocity = j.Unit * g.PathInformation.Speed
- end
- end)
- end
- return f
- end
- function a.d()
- local b, c, d, e, f =
- {
- TIME_VARIANCE = 0.07,
- COMPARISON_CHECKS = 1,
- JUMP_WHEN_STUCK = true,
- }, game:GetService("PathfindingService"), game:GetService("Players"), function(b, c)
- b(((b == error and "SimplePath Error: ") or "SimplePath: ") .. c)
- end, { StatusType = { Idle = "Idle", Active = "Active" }, ErrorType = { LimitReached = "LimitReached", TargetUnreachable = "TargetUnreachable", ComputationError = "ComputationError", AgentStuck = "AgentStuck" } }
- f.__index = function(g, h)
- if h == "Stopped" and not g._humanoid then
- e(error, "Attempt to use Path.Stopped on a non-humanoid.")
- end
- return (g._events[h] and g._events[h].Event)
- or (h == "LastError" and g._lastError)
- or (h == "Status" and g._status)
- or f[h]
- end
- local g = Instance.new("Part")
- g.Size = Vector3.new(0.3, 0.3, 0.3)
- g.Anchored = true
- g.CanCollide = false
- g.Material = Enum.Material.Neon
- g.Shape = Enum.PartType.Ball
- local h, i, j, k, l =
- function(h, i)
- h._lastError = i
- h._events.Error:Fire(i)
- end, function(h)
- local i = {}
- for j, k in ipairs(h) do
- local l = g:Clone()
- l.Position = k.Position
- l.Parent = workspace
- l.Color = (k == h[#h] and Color3.fromRGB(0, 255, 0)) or (k.Action == Enum.PathWaypointAction.Jump and Color3.fromRGB(255, 0, 0)) or Color3.fromRGB(255, 139, 0)
- table.insert(i, l)
- end
- return i
- end, function(h)
- if h then
- for i, j in ipairs(h) do
- j:Destroy()
- end
- end
- return
- end, function(h)
- for i = 2, #h._waypoints do
- if (h._waypoints[i].Position - h._waypoints[i - 1].Position).Magnitude > 0.1 then
- return i
- end
- end
- return 2
- end, function(h)
- pcall(function()
- if h._humanoid:GetState() ~= Enum.HumanoidStateType.Jumping and h._humanoid:GetState() ~= Enum.HumanoidStateType.Freefall then
- h._humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
- end
- end)
- end
- local m, n, o =
- function(m)
- if m._waypoints[m._currentWaypoint].Action == Enum.PathWaypointAction.Jump then
- l(m)
- end
- m._humanoid:MoveTo(m._waypoints[m._currentWaypoint].Position)
- end, function(m)
- m._moveConnection:Disconnect()
- m._moveConnection = nil
- end, function(m)
- local n, o = m._waypoints[m._currentWaypoint - 1], m._waypoints[m._currentWaypoint]
- m._events.WaypointReached:Fire(m._agent, n, o)
- end
- local p, q =
- function(p, q)
- if not getmetatable(p) then
- return
- end
- if not p._humanoid then
- if q and p._currentWaypoint + 1 <= #p._waypoints then
- o(p)
- p._currentWaypoint += 1
- elseif q then
- p._visualWaypoints = j(p._visualWaypoints)
- p._target = nil
- p._events.Reached:Fire(p._agent, p._waypoints[p._currentWaypoint])
- else
- p._visualWaypoints = j(p._visualWaypoints)
- p._target = nil
- h(p, p.ErrorType.TargetUnreachable)
- end
- return
- end
- if q and p._currentWaypoint + 1 <= #p._waypoints then
- if p._currentWaypoint + 1 < #p._waypoints then
- o(p)
- end
- p._currentWaypoint += 1
- m(p)
- elseif q then
- n(p)
- p._status = f.StatusType.Idle
- p._visualWaypoints = j(p._visualWaypoints)
- p._events.Reached:Fire(p._agent, p._waypoints[p._currentWaypoint])
- else
- n(p)
- p._status = f.StatusType.Idle
- p._visualWaypoints = j(p._visualWaypoints)
- h(p, p.ErrorType.TargetUnreachable)
- end
- end, function(p)
- if p._currentWaypoint == #p._waypoints then
- return
- end
- p._position._count = ((p._agent.PrimaryPart.Position - p._position._last).Magnitude <= 0.07 and (p._position._count + 1)) or 0
- p._position._last = p._agent.PrimaryPart.Position
- if p._position._count >= p._settings.COMPARISON_CHECKS then
- if p._settings.JUMP_WHEN_STUCK then
- l(p)
- end
- h(p, p.ErrorType.AgentStuck)
- end
- end
- function f.GetNearestCharacter(r)
- local s, t = math.huge
- for u, v in ipairs(d:GetPlayers()) do
- if v.Character and (v.Character.PrimaryPart.Position - r).Magnitude < s then
- t, s = v.Character, (v.Character.PrimaryPart.Position - r).Magnitude
- end
- end
- return t
- end
- function f.new(r, s, t)
- if not (r and r:IsA("Model") and r.PrimaryPart) then
- e(error, [[Pathfinding agent must be a valid Model Instance with a set PrimaryPart.]])
- end
- local u = setmetatable(
- {
- _settings = t or b,
- _events = {
- Reached = Instance.new("BindableEvent"),
- WaypointReached = Instance.new("BindableEvent"),
- Blocked = Instance.new("BindableEvent"),
- Error = Instance.new("BindableEvent"),
- Stopped = Instance.new("BindableEvent"),
- },
- _agent = r,
- _humanoid = r:FindFirstChildOfClass("Humanoid"),
- _path = c:CreatePath(s),
- _status = "Idle",
- _t = 0,
- _position = { _last = Vector3.new(), _count = 0 },
- },
- f
- )
- for v, w in pairs(b) do
- u._settings[v] = u._settings[v] == nil and w or u._settings[v]
- end
- u._path.Blocked:Connect(function(...)
- if
- u._currentWaypoint
- and (u._currentWaypoint <= ... and u._currentWaypoint + 1 >= ...)
- and u._humanoid
- then
- l(u)
- u._events.Blocked:Fire(u._agent, u._waypoints[...])
- end
- end)
- return u
- end
- function f:Destroy()
- for r, s in ipairs(self._events) do
- s:Destroy()
- end
- self._events = nil
- if rawget(self, "_visualWaypoints") then
- self._visualWaypoints = j(self._visualWaypoints)
- end
- self._path:Destroy()
- setmetatable(self, nil)
- for r, s in pairs(self) do
- self[r] = nil
- end
- end
- function f:Stop()
- if not self._humanoid then
- e(error, "Attempt to call Path:Stop() on a non-humanoid.")
- return
- end
- if self._status == f.StatusType.Idle then
- e(function(r)
- warn(debug.traceback(r))
- end, "Attempt to run Path:Stop() in idle state")
- return
- end
- n(self)
- self._status = f.StatusType.Idle
- self._visualWaypoints = j(self._visualWaypoints)
- self._events.Stopped:Fire(self._model)
- end
- function f:Run(r)
- if self._path then
- if not r and not self._humanoid and self._target then
- p(self, true)
- return
- end
- if not (r and (typeof(r) == "Vector3" or r:IsA("BasePart"))) then
- e(error, "Pathfinding target must be a valid Vector3 or BasePart.")
- end
- if os.clock() - self._t <= self._settings.TIME_VARIANCE and self._humanoid then
- task.wait(os.clock() - self._t)
- h(self, self.ErrorType.LimitReached)
- return false
- elseif self._humanoid then
- self._t = os.clock()
- end
- local s, t = pcall(function()
- self._path:ComputeAsync(
- self._agent.PrimaryPart.Position,
- (typeof(r) == "Vector3" and r) or r.Position
- )
- end)
- if
- not s
- or self._path.Status == Enum.PathStatus.NoPath
- or #self._path:GetWaypoints() < 2
- or (self._humanoid and self._humanoid:GetState() == Enum.HumanoidStateType.Freefall)
- then
- self._visualWaypoints = j(self._visualWaypoints)
- task.wait()
- h(self, self.ErrorType.ComputationError)
- return false
- end
- self._status = (self._humanoid and f.StatusType.Active) or f.StatusType.Idle
- self._target = r
- pcall(function()
- self._agent.PrimaryPart:SetNetworkOwner(nil)
- end)
- self._waypoints = self._path:GetWaypoints()
- self._currentWaypoint = 2
- if self._humanoid then
- q(self)
- end
- j(self._visualWaypoints)
- self._visualWaypoints = (self.Visualize and i(self._waypoints))
- self._moveConnection = self._humanoid
- and (
- self._moveConnection or self._humanoid.MoveToFinished:Connect(function(...)
- p(self, ...)
- end)
- )
- if self._humanoid then
- self._humanoid:MoveTo(self._waypoints[self._currentWaypoint].Position)
- elseif #self._waypoints == 2 then
- self._target = nil
- self._visualWaypoints = j(self._visualWaypoints)
- self._events.Reached:Fire(self._agent, self._waypoints[2])
- else
- self._currentWaypoint = k(self)
- p(self, true)
- end
- end
- return true
- end
- return f
- end
- function a.e()
- local b, c = game:GetService("ContextActionService"), {}
- function c:Disable()
- b:BindAction("StopMovement", function()
- return Enum.ContextActionResult.Sink
- end, false, table.unpack(Enum.PlayerActions:GetEnumItems()))
- end
- function c:Enable()
- b:UnbindAction("StopMovement")
- end
- return c
- end
- function a.f()
- local b, c, d = game:GetService("Players"), a.load("b"), {}
- function d:GetGui()
- local e = b.LocalPlayer
- local f = e:WaitForChild("PlayerGui")
- local g = (f:WaitForChild("Items"))
- return g
- end
- function d:GetInventoryItems()
- local e = d:GetGui()
- local f = (e:WaitForChild("ItemsHolder"))
- local g, h = (f:WaitForChild("ItemsScrollingFrame")), {}
- for i, j in pairs(g:GetChildren()) do
- if j:IsA("ImageButton") and not (j.Name == "ItemTemplate") then
- local k, l = j:FindFirstChild("ItemName"), j:FindFirstChild("ItemCount")
- if k and l then
- local m, n = k.Text, tonumber(string.match(l.Text, "%d+"))
- if n then
- for o = 1, n do
- table.insert(h, m)
- end
- end
- end
- end
- end
- return h
- end
- function d:EquipItem(e)
- local f = d:GetInventoryGUIDByItemName(e)
- if f then
- c.Get("toggle_equip_item_1", f)
- end
- end
- function d:GetInventoryGUIDByItemName(e)
- local f = d:GetGui()
- local g = (f:WaitForChild("ItemsHolder"))
- local h, i, j = (g:WaitForChild("ItemsScrollingFrame"))
- for k, l in pairs(h:GetChildren()) do
- if l:IsA("ImageButton") and not (l.Name == "ItemTemplate") then
- local m = l:FindFirstChild("ItemName")
- if m then
- if m.Text:lower() == e:lower() then
- i = l.Name
- j = (l:FindFirstChild("DestroyedItemIcon").Visible and "Destroyed" or "Alive")
- end
- end
- end
- end
- return i, j
- end
- function d:GetSlotsRemaining()
- local e = d:GetGui()
- local f = (e:WaitForChild("ItemsHolder"))
- local g = (f:WaitForChild("ItemsCloseButton"))
- local h = (g:FindFirstChild("DefaultItemsMaxItems"))
- if h then
- local i = h.Text:split("/")
- local j, k = tonumber(i[1]), tonumber(i[2])
- if j and k then
- return k - j
- end
- end
- return 0
- end
- function d:GetBestHackingTool()
- local e, f =
- d:GetInventoryItems(), { "HackToolQuantum", "HackToolUltimate", "HackToolPro", "HackToolBasic" }
- for g, h in pairs(f) do
- if table.find(e, h) then
- return h
- end
- end
- return nil
- end
- return d
- end
- function a.g()
- local b, c, d, e = game:GetService("Players"), a.load("b"), a.load("f"), {}
- e.__index = e
- function e.new(f, g)
- local h = {}
- setmetatable(h, e)
- h.RadiusPart = h:CreateRadiusPart()
- h.Model = f
- h.Position = ((f:FindFirstChild("Area"))).Position
- return h
- end
- function e.CreateRadiusPart(f)
- local g = Instance.new("Part", workspace)
- g.Name = "x"
- g.Anchored = true
- g.CanCollide = false
- g.Transparency = 0.95
- g.Material = Enum.Material.Neon
- g.Color = Color3.fromRGB(0, 0, 255)
- g.Shape = Enum.PartType.Ball
- return g
- end
- function e.GetStatus(f)
- local g = (f.Model:FindFirstChild("Screen", true))
- if g and g.Enabled then
- return "Hacked"
- end
- return "Not Hacked"
- end
- function e.GetCushionPosition(f)
- local g = (f.Model:FindFirstChild("Area"))
- return g.Position - (-(g.CFrame.LookVector).Unit * 2.5)
- end
- function e.IsSafe(f)
- local g, h = 100, true
- for i, j in pairs(game:GetService("Players"):GetPlayers()) do
- if j == b.LocalPlayer then
- continue
- end
- if not j.Character then
- continue
- end
- local k = (j.Character:FindFirstChild("HumanoidRootPart"))
- if k then
- h = (k.Position - f.Position).Magnitude > g
- if not h then
- break
- end
- end
- end
- f.RadiusPart.Position = f.Position
- f.RadiusPart.Size = Vector3.new(g * 2, g * 2, g * 2)
- return h
- end
- function e.Deposit(f, g)
- if g <= 0 then
- return
- end
- c.Get("transfer_funds", "hand", "bank", g)
- end
- function e.Withdrawl(f, g)
- if g <= 0 then
- return
- end
- c.Get("transfer_funds", "bank", "hand", g)
- end
- function e.Hack(f)
- local g = d:GetBestHackingTool()
- if f:GetStatus() == "Not Hacked" and g then
- c.Send("request_begin_hacking_3", f.Model, g)
- task.wait(1)
- c.Send("atm_win_3", f.Model)
- end
- end
- return e
- end
- function a.h()
- local b, c = a.load("g"), { ATMS = {}, LastLoaded = 0 }
- function c:Init()
- for d, e in pairs(workspace:GetDescendants()) do
- if e.Name == "x" then
- e:Destroy()
- end
- if e:IsA("Model") and e.Name == "DoorSystem" then
- for f, g in pairs(e:GetDescendants()) do
- if g:IsA("BasePart") and not g:FindFirstChild("PathfindingModifier") then
- local h = Instance.new("PathfindingModifier", g)
- h.PassThrough = true
- h.Label = "Door"
- g.CanCollide = false
- end
- end
- end
- end
- if (tick() - c.LastLoaded) > 5 then
- c.LastLoaded = tick()
- table.clear(c.ATMS)
- local d = workspace:WaitForChild("Map"):WaitForChild("Props"):WaitForChild("ATMs")
- if d then
- for e, f in pairs(d:GetChildren()) do
- if f:IsA("Model") and f.Name == "ATM" then
- local g = b.new(f)
- table.insert(c.ATMS, g)
- end
- end
- end
- end
- end
- return c
- end
- function a.i()
- local b, c, d, e, f, g, h, i, j =
- game:GetService("TweenService"),
- game:GetService("RunService"),
- a.load("b"),
- a.load("c"),
- a.load("d"),
- a.load("e"),
- a.load("g"),
- a.load("h"),
- {
- OldMoveToTween = nil,
- OldMoveToPartInfo = {},
- PathFinished = Instance.new("BindableEvent"),
- OldPath = nil,
- OldPathBlocked = nil,
- OldPathFinished = nil,
- OldPathReached = nil,
- }
- function j:GetCharacter()
- local k = game:GetService("Players").LocalPlayer
- return k.Character or k.CharacterAdded:Wait()
- end
- function j:GetHumanoid()
- local k = j:GetCharacter()
- if k then
- return k:WaitForChild("Humanoid")
- end
- return nil
- end
- function j:CancelWalkToPoint()
- if j.OldPath then
- j.OldPath:Destroy()
- j.OldPath = nil
- end
- end
- function j:GetHandMoney()
- local k = d.UIGet("HandBalanceLabel").Text
- return (tonumber((string.match(k, "%d+"))))
- end
- function j:GetBankMoney()
- local k = d.UIGet("BankBalanceLabel").Text
- return (tonumber((string.match(k, "%d+"))))
- end
- function j:SetCollisions(k)
- local l = j:GetCharacter()
- if l then
- l:WaitForChild("HumanoidRootPart").Anchored = not k
- for m, n in pairs(l:GetDescendants()) do
- if n:IsA("BasePart") and n.CanCollide == not k then
- n.CanCollide = k
- end
- end
- end
- end
- function j:WalkToPoint(k) end
- function j:IsAlive()
- local k = j:GetHumanoid()
- return k and k.Health > 0
- end
- function j:GetClosestUsableATM(k)
- local l, m = math.huge
- for n, o in pairs(i.ATMS) do
- local p = j:GetDistance(o.Position)
- if p < l and (k or o:GetStatus() == "Not Hacked") and o:IsSafe() then
- l = p
- m = o
- end
- end
- return m
- end
- function j:Sprint(k)
- local l = game:GetService("ReplicatedStorage")
- local m = (l:WaitForChild("Modules"))
- local n = m:WaitForChild("Game")
- require(n:WaitForChild("Sprint")).sprinting.set(k)
- end
- function j:EquipTool(k)
- local l = game:GetService("Players").LocalPlayer
- local m, n = (l:WaitForChild("Backpack")), j:GetCharacter()
- if n then
- if not n:FindFirstChild(k) then
- local o = m:WaitForChild(k, 3)
- o.Parent = n
- end
- end
- end
- function j:GetDistance(k)
- local l = j:GetCharacter()
- local m = l and (l:WaitForChild("HumanoidRootPart"))
- if m then
- return (m.Position - k).Magnitude
- end
- return 0
- end
- function j:GetVehicle()
- local k = j:GetHumanoid()
- local l = k and k.SeatPart
- local m = l and l:FindFirstAncestorOfClass("Model")
- local n = m and m:FindFirstChild("Chassis")
- if n then
- local o = m and e.new(m, (j:GetCharacter()))
- return o
- elseif m and not n then
- k:ChangeState(Enum.HumanoidStateType.Jumping)
- end
- return nil
- end
- return j
- end
- function a.j()
- local b, c = a.load("a"), a.load("i")
- local d = function(d, e, f)
- local g = c:GetCharacter()
- if g then
- g.PrimaryPart.Anchored = false
- end
- if not d.Model:FindFirstChild("Chassis") then
- return false
- end
- local h, i = 10, false
- for j = 1, h do
- local k = d:DriveToPosition(e, 55)
- if k then
- i = true
- break
- else
- warn(`Pathfinding failed on attempt {j}/{h}. Retrying...`)
- task.wait(0.3 + (j * 0.05))
- end
- end
- if not i then
- warn("All pathfinding attempts failed. Giving up.")
- return false
- end
- if not f then
- d.PathInformation.Finished.Event:Wait()
- end
- return true
- end
- return {
- Name = "Drive to ATM",
- Enter = function(e, f)
- local g, h = c:GetClosestUsableATM(), c:GetVehicle()
- if not h or not h:Sitting() then
- e:GoTo("Wait for vehicle")
- return
- end
- if not g then
- e:GoTo("Wait for ATM")
- return
- end
- local i, j = false
- j = h.PathInformation.Finished.Event:Connect(function()
- i = true
- end)
- if not d(h, g.Position, true) then
- j:Disconnect()
- e:GoTo("Wait for ATM")
- return
- end
- repeat
- task.wait()
- until i or not (c:GetClosestUsableATM() == g) or not c:IsAlive()
- j:Disconnect()
- if not c:IsAlive() then
- e:GoTo("Wait for vehicle")
- return
- end
- if not (c:GetClosestUsableATM() == g) then
- h:StopDrive()
- e:GoTo("Wait for ATM")
- return
- end
- e:GoTo("Reached ATM")
- end,
- }
- end
- function a.k()
- local b, c, d, e, f =
- a.load("b"), a.load("i"), a.load("f"), a.load("c"), { CooldownInfo = {
- LastSpawned = 0,
- Cooldown = 303,
- }, LastVehicle = nil }
- function f:GetVehicleByGuid(g)
- local h = workspace:WaitForChild("Vehicles")
- for i, j in pairs(h:GetChildren()) do
- if j:GetAttribute("ItemGUID") == g then
- return j
- end
- end
- return nil
- end
- function f:RepairVehicle(g)
- local h = d:GetInventoryGUIDByItemName(g)
- if h then
- b.Get("repair_vehicle", h)
- print("sent")
- end
- end
- function f:SpawnVehicle(g)
- if f.LastVehicle then
- f.LastVehicle:Destroy()
- end
- local h = (tick() - f.CooldownInfo.LastSpawned) < f.CooldownInfo.Cooldown
- if h then
- warn(`[VehicleService] cooldown active, waiting...`)
- repeat
- task.wait()
- until (tick() - f.CooldownInfo.LastSpawned) >= f.CooldownInfo.Cooldown
- end
- local i, j = d:GetInventoryGUIDByItemName(g)
- local k = c:GetCharacter()
- if h then
- end
- print(j)
- if i and k and not (j == "Destroyed") then
- warn("[VehicleService] attempting now.")
- d:EquipItem(g)
- local l, m = (tick())
- repeat
- d:EquipItem(g)
- m = f:GetVehicleByGuid(i)
- task.wait()
- until m or (tick() - l) > 10
- if m then
- f.CooldownInfo.LastSpawned = tick()
- local n = e.new(m, k)
- f.LastVehicle = n
- return n
- end
- end
- if i and k and j == "Destroyed" then
- return "Destroyed"
- end
- return nil
- end
- return f
- end
- function a.l()
- local b, c, d, e, f =
- { Position = Vector3.new(-210.82943725585938, 255.03460693359375, 387.3525695800781) },
- a.load("f"),
- a.load("b"),
- a.load("i"),
- game:GetService("Players")
- b.DeviceInfo = {
- HackToolBasic = { Price = 10, Level = 0 },
- HackToolPro = {
- Price = 150,
- Level = 12,
- },
- HackToolUltimate = { Price = 350, Level = 50 },
- HackToolQuantum = { Price = 550, Level = 90 },
- }
- function b:GetPosition()
- local g, h = b:GetBestDevice()
- if h == "HackToolQuantum" then
- return Vector3.new(1171.2374267578125, 255.07566833496094, -352.3292236328125)
- end
- return b.Position
- end
- function b:GetLevel()
- local g = f.LocalPlayer
- local h = g:WaitForChild("PlayerGui")
- local i = (h:WaitForChild("Skills"))
- local j = (i:WaitForChild("SkillsHolder"))
- local k = (j:WaitForChild("SkillsScrollingFrame"))
- for l, m in pairs(k:GetChildren()) do
- local n = (m:FindFirstChild("SkillTitle"))
- local o = n and n.Text
- if o then
- if string.find(o:lower(), "swiper") then
- return (tonumber((string.match(o, "%d+"))))
- end
- end
- end
- return 0
- end
- function b:GetBestDevice()
- local g, h, i, j = b:GetLevel(), -1
- for k, l in pairs(b.DeviceInfo) do
- if g >= l.Level and l.Level > h then
- h = l.Level
- j = l
- i = k
- end
- end
- return j, i
- end
- function b:GetMoneyNeeded()
- local g, h = b:GetBestDevice(), c:GetSlotsRemaining()
- warn(`[Dealer]: Slots: {h}`)
- return math.min(g.Price * h, e:GetBankMoney())
- end
- function b:HowManyHacksToBuy()
- local g, h = b:GetBestDevice()
- local i, j = c:GetSlotsRemaining(), e:GetHandMoney()
- return math.min(math.floor(j / g.Price), i)
- end
- function b:BuyHackTools()
- local g, h = b:GetBestDevice()
- local i, j =
- b:HowManyHacksToBuy(),
- h == "HackToolQuantum" and workspace:WaitForChild("ShopZone_IllegalNightclub")
- or workspace:WaitForChild("ShopZone_Illegal")
- for k = 1, i do
- d.Get("purchase_consumable", j, h)
- end
- end
- return b
- end
- function a.m()
- local b, c, d, e, f = a.load("a"), a.load("i"), a.load("k"), a.load("l"), a.load("f")
- local g = function(g, h, i)
- local j = c:GetCharacter()
- if j then
- j.PrimaryPart.Anchored = false
- end
- if not g.Model:FindFirstChild("Chassis") then
- return false
- end
- local k, l = 10, false
- for m = 1, k do
- local n = g:DriveToPosition(h, 55)
- if n then
- l = true
- break
- else
- warn(`Pathfinding failed on attempt {m}/{k}. Retrying...`)
- task.wait(0.3 + (m * 0.05))
- end
- end
- if not l then
- warn("All pathfinding attempts failed. Giving up.")
- return false
- end
- if not i then
- g.PathInformation.Finished.Event:Wait()
- end
- return true
- end
- return {
- Name = "Go to dealer",
- Enter = function(h, i)
- local j = c:GetVehicle()
- if not j then
- h:GoTo("Wait for vehicle")
- return
- end
- local k, l = false
- l = j.PathInformation.Finished.Event:Connect(function()
- k = true
- end)
- if not g(j, e:GetPosition(), true) then
- l:Disconnect()
- h:GoTo("Wait for ATM")
- return
- end
- repeat
- task.wait()
- until k or not c:GetVehicle() or not c:IsAlive()
- l:Disconnect()
- if not c:IsAlive() or not c:GetVehicle() then
- h:GoTo("Wait for vehicle")
- return
- end
- j:StopDrive()
- e:BuyHackTools()
- h:GoTo("Wait for ATM")
- end,
- }
- end
- function a.n()
- local b, c, d, e, f = a.load("a"), a.load("i"), a.load("k"), a.load("l"), a.load("f")
- return {
- Name = "Reached ATM",
- Enter = function(g, h)
- local i, j = c:GetClosestUsableATM(), c:GetVehicle()
- if not j or not j:Sitting() then
- g:GoTo("Wait for vehicle")
- return
- end
- if not i then
- g:GoTo("Wait for ATM")
- return
- end
- j:Exit()
- repeat
- task.wait()
- until not c:GetVehicle()
- c:WalkToPoint(i.Position)
- if not f:GetBestHackingTool() then
- i:Withdrawl(e:GetMoneyNeeded())
- c:CancelWalkToPoint()
- local k = false
- local l = c.PathFinished.Event:Connect(function()
- k = true
- end)
- c:WalkToPoint(j.Model:WaitForChild("Chassis").Position)
- repeat
- task.wait()
- j:Enter()
- until not c:IsAlive() or k or j:Sitting()
- l:Disconnect()
- c:CancelWalkToPoint()
- j:Enter()
- if not c:IsAlive() then
- g:GoTo("Wait for vehicle")
- return
- end
- if j:Sitting() then
- g:GoTo("Go to dealer")
- return
- end
- local m = tick()
- repeat
- task.wait()
- until j:Sitting() and c:GetVehicle() or tick() - m > 5
- if j:Sitting() and c:GetVehicle() then
- g:GoTo("Go to dealer")
- return
- end
- if tick() - m > 5 then
- g:GoTo("Wait for vehicle")
- return
- end
- end
- d:RepairVehicle("escooter")
- if c:GetHandMoney() > 0 then
- i:Deposit(c:GetHandMoney())
- end
- i:Hack()
- c:WalkToPoint(j.Model:WaitForChild("Chassis").Position)
- repeat
- task.wait()
- j:Enter()
- until not c:IsAlive() or j:Sitting() and c:GetVehicle()
- c:CancelWalkToPoint()
- j:Enter()
- g:GoTo("Wait for vehicle")
- end,
- }
- end
- function a.o()
- local b, c, d, e = a.load("a"), a.load("k"), a.load("i"), a.load("h")
- return {
- Name = "Repair vehicle",
- Enter = function(f, g)
- e:Init()
- if d:GetHandMoney() >= 200 then
- c:RepairVehicle("escooter")
- f:GoTo("Wait for vehicle")
- return
- end
- local h, i, j = false
- j = d.PathFinished.Event:Connect(function()
- h = true
- end)
- while true do
- local k = d:GetClosestUsableATM()
- if not (k == i) then
- i = k
- d:WalkToPoint(k.Position)
- end
- if h or not d:IsAlive() then
- break
- end
- task.wait()
- end
- j:Disconnect()
- d:CancelWalkToPoint()
- if not d:IsAlive() then
- f:GoTo("Wait for vehicle")
- return
- end
- i:Withdrawl(200)
- c:RepairVehicle("escooter")
- f:GoTo("Wait for vehicle")
- end,
- }
- end
- function a.p()
- local b, c, d = a.load("a"), a.load("h"), a.load("i")
- return {
- Name = "Wait for ATM",
- Enter = function(e, f)
- c:Init()
- repeat
- task.wait()
- until d:GetClosestUsableATM() or not d:IsAlive()
- if not d:IsAlive() then
- e:GoTo("Wait for vehicle")
- return
- end
- e:GoTo("Drive to ATM")
- end,
- }
- end
- function a.q()
- local b, c, d = {}, a.load("i"), game:GetService("Players")
- local e = d.LocalPlayer
- local f = e:WaitForChild("PlayerGui")
- function b:ClickButton(g)
- for h, i in pairs(getconnections(g.MouseButton1Click)) do
- i:Fire()
- end
- for h, i in pairs(getconnections(g.MouseButton1Down)) do
- i:Fire()
- end
- end
- function b:GetSplashScreenButton()
- local g = (f:WaitForChild("SplashScreenGui"))
- local h = (g:WaitForChild("Frame"))
- local i = (h:WaitForChild("PlayButton"))
- repeat
- task.wait()
- until i.Visible and i.ImageTransparency < 0.3 and g.Enabled and h.Visible
- task.wait(1)
- return i
- end
- function b:GetAvatarSkipButton()
- local g = f:WaitForChild("CharacterCreator")
- local h = g:WaitForChild("MenuFrame")
- return (h:WaitForChild("AvatarMenuSkipButton"))
- end
- function b:GetCreatorArea()
- return (workspace:FindFirstChild(`{e.Name}_character_creator_area`))
- end
- function b:WaitForCharacter()
- return e.Character or e.CharacterAdded:Wait()
- end
- function b:WaitForCharacterInGame()
- local g, h = b:WaitForCharacter(), b:GetCreatorArea()
- if not h then
- task.wait()
- b:WaitForCharacterInGame()
- return
- end
- repeat
- task.wait()
- until g:GetAttribute("LoadedCharacter")
- repeat
- task.wait()
- until c:GetDistance(h:WaitForChild("Main").Position) > 30
- g = b:WaitForCharacter()
- repeat
- task.wait()
- until g:GetAttribute("LoadedCharacter")
- return g
- end
- function b:Respawn()
- local g = (f:WaitForChild("DeathScreen"))
- local h = (g:WaitForChild("DeathScreenHolder"))
- local i = h:WaitForChild("Frame")
- local j = i:WaitForChild("RespawnButtonFrame")
- local k = (j:WaitForChild("RespawnButton"))
- if k then
- if k.Visible and h.Visible then
- if g.Enabled then
- if not string.match(k:FindFirstChildOfClass("TextLabel").Text, "%d+") then
- firesignal(k.MouseButton1Down)
- firesignal(k.MouseButton1Click)
- end
- end
- end
- end
- end
- function b:Play()
- b:ClickButton(b:GetSplashScreenButton())
- task.wait(3)
- b:ClickButton(b:GetAvatarSkipButton())
- end
- return b
- end
- function a.r()
- local b, c, d, e, f, g, h =
- a.load("a"), a.load("b"), a.load("k"), a.load("c"), a.load("f"), a.load("i"), a.load("q")
- return {
- Name = "Wait for vehicle",
- Enter = function(i, j)
- local k = h:WaitForCharacterInGame()
- if not k:FindFirstChild("HumanoidRootPart") then
- i:GoTo("Wait for vehicle")
- return
- end
- if not g:IsAlive() then
- i:GoTo("Wait for vehicle")
- return
- end
- local l = g:GetVehicle()
- if l and l:Sitting() then
- i:GoTo("Wait for ATM")
- return
- end
- g:CancelWalkToPoint()
- local m = f:GetInventoryGUIDByItemName("escooter")
- local n = m and d:GetVehicleByGuid(m)
- print(m, n)
- if n then
- local o = e.new(n, k)
- if o then
- o:Enter()
- local p = tick()
- repeat
- task.wait()
- until g:GetVehicle() and o:Sitting() or tick() - p >= 5
- if g:GetVehicle() and o:Sitting() then
- i:GoTo("Wait for ATM")
- return
- end
- end
- end
- warn("[WaitForVehicle]: Character ready. Spawning vehicle.")
- local o = (d:SpawnVehicle("escooter"))
- if o and typeof(o) == "table" then
- repeat
- task.wait()
- o:Enter()
- until g:GetVehicle() and ((g:GetVehicle())):Sitting() or not g:IsAlive()
- if not g:IsAlive() then
- i:GoTo("Wait for vehicle")
- return
- end
- i:GoTo("Wait for ATM")
- return
- elseif o == "Destroyed" then
- i:GoTo("Repair vehicle")
- return
- else
- c.Send("request_respawn")
- i:GoTo("Wait for vehicle")
- return
- end
- end,
- }
- end
- function a.s()
- local b, c = a.load("a"), a.load("b")
- local d, e = b.new(), { a.load("j"), a.load("m"), a.load("n"), a.load("o"), a.load("p"), a.load("r") }
- function d:Start()
- if not self.Started then
- self.Started = true
- local f = {}
- for g, h in pairs(e) do
- table.insert(f, {
- Name = h.Name,
- Enter = function()
- task.defer(h.Enter, d, "lol")
- return true
- end,
- })
- end
- d.Timeout = function()
- c.Send("request_respawn")
- d:GoTo("Wait for vehicle")
- end
- d:DefineStates(f)
- d:GoTo("Wait for vehicle")
- end
- end
- return d
- end
- end
- repeat
- task.wait()
- until game:IsLoaded()
- local b, c, d, e, f, g =
- game:GetService("Players"),
- cloneref(game:GetService("VirtualUser")),
- game:GetService("TeleportService"),
- a.load("s"),
- a.load("i"),
- a.load("q")
- local h = b.LocalPlayer
- h.Idled:Connect(function()
- c:CaptureController()
- c:ClickButton2(Vector2.new())
- end)
- print("??")
- task.spawn(function()
- while true do
- g:Respawn()
- task.wait()
- end
- end)
- g:Play()
- g:WaitForCharacterInGame()
- task.wait(5)
- local i = f:GetHumanoid()
- if i then
- i:GetPropertyChangedSignal("Health"):Connect(function()
- if i.Health <= 0 then
- d:Teleport(game.PlaceId)
- end
- end)
- end
- e:Start()
- queue_on_teleport(`loadstring(game:HttpGet("https://pastebin.com/raw/vST9RTrM?j=a"))()`)
Add Comment
Please, Sign In to add comment