Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- 28/2/2023: last exploit(s) before going home tomorrow
- COIN_TYPE = {'BeachBall'}
- local container
- for i,v in pairs(workspace:GetDescendants()) do
- if v.Name == 'CoinContainer' then
- container = v
- break
- end
- end
- myplr = game.Players.LocalPlayer
- uis = game:GetService('UserInputService')
- pathfinder = game:GetService('PathfindingService')
- tweener = game:GetService('TweenService')
- local event
- local stop = false
- event = uis.InputBegan:Connect(function(input,gpe)
- if gpe then return end
- if input.KeyCode == Enum.KeyCode.X then
- stop = true
- end
- end)
- --/////////////////////////////////////////////////////////
- function createPath(from,to)
- local agentParams = {
- AgentHeight = 2.5,
- AgentRadius = 2,
- AgentCanJump = true
- }
- local path = pathfinder:CreatePath(agentParams)
- path:ComputeAsync(from,to)
- if path.Status == Enum.PathStatus.Success then
- local waypoints = path:GetWaypoints()
- return path,waypoints
- end
- end
- function insight(from,target) -- make sure no players see us or we'll be accused of cheating
- for i,plr in pairs(game.Players:GetChildren()) do
- if plr ~= myplr then
- local params = RaycastParams.new()
- params.FilterType = Enum.RaycastFilterType.Exclude
- params.FilterDescendantsInstances = {myplr.Character}
- local result = workspace:Raycast(from, (target.Position-from).Unit*150, params)
- if result and result.Instance then
- if result.Instance == target or result.Instance:IsDescendantOf(target) then
- return true
- end
- end
- end
- end
- end
- function noclip()
- for _,v in pairs(myplr.Character:GetDescendants()) do
- if v:IsA('BasePart') and v.CanCollide then
- v.CanCollide = false
- end
- end
- end
- lastpos = nil
- while not stop do
- if myplr.Character then
- root = myplr.Character:FindFirstChild('HumanoidRootPart')
- hum = myplr.Character:FindFirstChild('Humanoid')
- if root and hum then
- local coin
- local dist = 300
- for i,v in pairs(container:GetChildren()) do
- if v:FindFirstChild('Coin') and table.find(COIN_TYPE, v.CoinType.Value) then -- hasnt been collected
- if insight(root.Position, v) then
- if (v.Position - root.Position).Magnitude < dist then
- coin = v
- dist = (v.Position - root.Position).Magnitude
- end
- end
- end
- end
- -- if no coin is insight then find the nearest coin without that condition
- dist = 300
- if coin == nil then
- for i,v in pairs(container:GetChildren()) do
- if v:FindFirstChild('Coin') and table.find(COIN_TYPE, v.CoinType.Value) then -- hasnt been collected
- if (v.Position - root.Position).Magnitude < dist then
- coin = v
- dist = (v.Position - root.Position).Magnitude
- end
- end
- end
- end
- if math.random(1,10) == 1 then
- hum:MoveTo(root.Position + Vector3.new(math.random(-8,8),0,math.random(-8,8)))
- hum.Jump = true
- end
- local path,waypoints = createPath(root.Position, coin.Position)
- if path and waypoints then
- local bg = Instance.new('BodyGyro')
- bg.P = 10000
- bg.MaxTorque = Vector3.new(99999,99999,99999)
- local bp = Instance.new('BodyPosition')
- bp.P = 40000
- bp.MaxForce = Vector3.new(999999,999999,999999)
- for i,waypoint in pairs(waypoints) do
- if i == 1 then continue end
- if hum.Health == 0 or root.Parent == nil or stop then break end
- local rootpos = root.Position
- local movepos = waypoint.Position + Vector3.new(0,2,0)
- local movedir = (movepos - rootpos).Unit
- if lastpos and (rootpos - lastpos).Magnitude < .1 then
- break -- meaning we are stuck
- end
- if waypoint.Action == Enum.PathWaypointAction.Jump then
- hum.Jump = true
- end
- --[[local lookpos = Vector3.new(movepos.X, rootpos.Y, movepos.Z)
- local rootcf = CFrame.new(rootpos)
- for i = 0,1,1/3 do
- root.CFrame = rootcf:Lerp(CFrame.new(movepos), i)
- end]]
- bp.Position = movepos
- bp.Parent = root
- bg.CFrame = CFrame.new(rootpos, movepos)
- bg.Parent = root
- noclip()
- wait(.15)
- lastpos = movepos
- end
- bp:Destroy()
- bg:Destroy()
- end
- end
- end
- wait()
- end
- event:Disconnect()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement