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'}
- myplr = game.Players.LocalPlayer
- cam = workspace.CurrentCamera
- uis = game:GetService('UserInputService')
- pathfinder = game:GetService('PathfindingService')
- tweener = game:GetService('TweenService')
- vim = game:GetService('VirtualInputManager')
- run = game:GetService('RunService')
- for i,v in pairs(workspace:GetDescendants()) do
- if v.Name == 'CoinContainer' then
- container = v
- break
- end
- end
- spawn(function()
- while wait(2) do
- if stop then break end
- -- prevent 20 minutes idle disconnection
- if not hasgun then
- vim:SendMouseButtonEvent(0,0,0, true, game,1)
- vim:SendMouseButtonEvent(0,0,0, false, game,1)
- end
- for i,v in pairs(workspace:GetDescendants()) do
- if v.Name == 'CoinContainer' then
- container = v
- break
- end
- end
- end
- end)
- --/////////////////////////////////////////
- event = nil
- 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 waypointLength(waypoints)
- local sum = 0
- local lastpoint
- for i,waypoint in pairs(waypoints) do
- if lastpoint then
- sum = sum + (waypoint.Position - lastpoint.Position).Magnitude
- end
- lastpoint = waypoint
- end
- return sum
- end
- --////////////////////////////////////////////
- clip = true
- function Nocl()
- if game.Players.LocalPlayer.Character ~= nil then
- for _,v in pairs(game.Players.LocalPlayer.Character:GetDescendants()) do
- if v:IsA("BasePart") and (v.CanCollide or v.Name == 'HumanoidRootPart' or v.Name == 'UpperTorso' or v.Name == 'LowerTorso') then
- v.CanCollide = clip == true and true or false
- end
- end
- end
- wait(0.21) -- basic optimization
- end
- Noclip = game:GetService('RunService').Stepped:Connect(Nocl)
- --////////////////////////////////////////////////////////
- killer = nil
- spawn(function()
- while not stop do
- wait()
- for i,plr in pairs(game.Players:GetChildren()) do
- if plr ~= myplr and plr.Character and plr.Character:FindFirstChild('Knife') then
- killer = plr.Character
- end
- end
- end
- end)
- function killernear()
- if killer and killer.Parent and killer:FindFirstChild('HumanoidRootPart') then
- local dangerdist = (root.Position - killer.HumanoidRootPart.Position).Magnitude
- return dangerdist <= 30
- end
- return false
- end
- function killerinsight()
- if killer and killer.Parent and killer:FindFirstChild('HumanoidRootPart') then
- local params = RaycastParams.new()
- params.FilterType = Enum.RaycastFilterType.Exclude
- params.FilterDescendantsInstances = {myplr.Character}
- local result = workspace:Raycast(root.Position, (killer.HumanoidRootPart.Position - root.Position).Unit*150, params)
- return (result and result.Instance and result.Instance:IsDescendantOf(killer)) and true or false
- end
- return false
- end
- --////////////////////////////////////////////////////////
- function isInLobby()
- if root and root.Parent then
- local touches = workspace:GetPartBoundsInBox(
- root.CFrame,
- Vector3.new(2,20,2)
- )
- for i,v in pairs(touches) do
- if v:IsDescendantOf(workspace.Lobby) then
- return true
- end
- end
- return false
- else -- root not found meaning that we just died and havent yet respawned into the lobby
- return true
- end
- end
- function fly(checkkiller)
- clip = false
- local rootpos = root.Position
- local movepos = coin.Position + Vector3.new(0,2,0)
- local bg = Instance.new('BodyGyro')
- bg.P = 10000
- bg.MaxTorque = Vector3.new(999999,999999,999999)
- bg.CFrame = CFrame.new(rootpos, movepos)
- bg.Parent = root
- local bv = Instance.new('BodyVelocity')
- bv.MaxForce = Vector3.new(999999,999999,999999)
- lastpos = nil
- repeat
- tries = tries + 1
- if tries >= 4 then
- tries = 0
- if lastpos and (rootpos - lastpos).Magnitude < 2 then
- if lastcoin and lastcoin == coin then
- coin.Parent = nil -- cursed coin, cannot be collected
- lastcoin = nil
- break
- end
- end
- lastpos = root.Position
- end
- bv.Velocity = (movepos - rootpos).Unit*26
- bv.Parent = root
- wait(.2)
- local henear = checkkiller and (killernear() or killerinsight())
- until (root.Position - rootpos).Magnitude >= (movepos - rootpos).Magnitude or hum.Health == 0 or stop or henear
- bv:Destroy()
- bg:Destroy()
- clip = true
- lastcoin = coin
- end
- --////////////////////////////////////////////////////
- lastpos = nil
- lastcoin = nil
- tries = 0
- coin = nil
- cointable = {}
- count = 0
- while not stop do
- local succ, msg = pcall(function()
- if myplr.Character and container and container.Parent then
- root = myplr.Character:FindFirstChild('HumanoidRootPart')
- hum = myplr.Character:FindFirstChild('Humanoid')
- if root and hum and not isInLobby() then
- cointable = {}
- count = 0
- coin = nil
- for i,v in pairs(container:GetChildren()) do
- if v:FindFirstChild('Coin') then
- count = count + 1
- if table.find(COIN_TYPE, v.CoinType.Value) then
- local ele = {}
- ele.obj = v
- --[[local path, waypoints = createPath(root.Position, v.Position)
- ele.path = path
- ele.waypoints = waypoints
- if path and waypoints then
- ele.dist1 = waypointLength(waypoints)
- else
- ele.dist1 = (v.Position - root.Position).Magnitude -- lower priority, therefore degree 2
- end]]
- ele.dist1 = (v.Position - root.Position).Magnitude
- ele.dist2 = (killer and killer.Parent) and (v.Position - killer.HumanoidRootPart.Position).Magnitude or 300
- table.insert(cointable, ele)
- end
- end
- end
- if not killernear() and not killerinsight() then
- local mindist = 666
- local path,waypoints
- for i,v in pairs(cointable) do
- if v.dist1 <= mindist and v.dist1 >= 4 and v.dist2 >= 40 then
- coin = v.obj
- mindist = v.dist1
- path = v.path
- waypoints = v.waypoints
- end
- end
- if coin then
- local path, waypoints = createPath(root.Position, coin.Position)
- if path and waypoints and killer and killer.Parent then -- if the killer hasnt revealed self yet, its unsafe to run around
- print'path waypoint'
- clip = false
- lastpos = nil
- for i,waypoint in pairs(waypoints) do
- if hum.Health == 0 or root.Parent == nil or stop or killernear() or killerinsight() then break end
- if i == 1 then continue end
- local rootpos = root.Position
- local movepos = waypoint.Position + Vector3.new(0,3,0)
- local movedir = (movepos - rootpos).Unit
- tries = tries + 1
- if tries >= 4 then
- tries = 0
- if lastpos and (rootpos - lastpos).Magnitude < 1 then
- if lastcoin and lastcoin == coin then
- coin.Parent = nil -- cursed coin, cannot be collected
- lastcoin = nil
- break
- end
- end
- lastpos = root.Position
- end
- local bg = Instance.new('BodyGyro')
- bg.P = 10000
- bg.MaxTorque = Vector3.new(999999,999999,999999)
- local bp = Instance.new('BodyPosition')
- bp.P = 40000
- bp.MaxForce = Vector3.new(999999,999999,999999)
- bp.Position = movepos
- bp.Parent = root
- bg.CFrame = CFrame.new(rootpos, movepos)
- bg.Parent = root
- wait(.15)
- bp:Destroy()
- bg:Destroy()
- end
- clip = true
- lastcoin = coin
- else
- print'no path'
- fly(true)
- end
- end
- else
- local maxdist = 0
- for i,v in pairs(cointable) do
- if v.dist2 >= maxdist then
- coin = v.obj
- maxdist = v.dist2
- end
- end
- print'killer near'
- if count > 0 then -- so we dont teleport down the map when the bag is full
- clip = false
- local bp = Instance.new('BodyPosition')
- bp.P = 10000
- bp.MaxForce = Vector3.new(999999,999999,999999)
- bp.Position = root.Position + Vector3.new(0,-30,0)
- bp.Parent = root
- wait(1)
- bp:Destroy()
- clip = true
- if coin then
- fly()
- end
- end
- end
- if coin == nil and count == 0 then -- either we are in the lobby or that bag is full
- -- make sure that the below only trigger when bag is full
- if myplr.Backpack:FindFirstChild('Knife') then
- -- reset if we're the murderer
- hum:ChangeState(Enum.HumanoidStateType.Dead)
- else
- hasgun = false
- if myplr.Backpack:FindFirstChild('Gun') then
- hasgun = true
- else
- if workspace:FindFirstChild('GunDrop') then
- wait(2)
- if workspace:FindFirstChild('GunDrop') then
- -- make sure the gun hasnt been stolen by somebody else
- repeat
- root.CFrame = workspace.GunDrop.CFrame * CFrame.new(0,5,0)
- wait()
- until myplr.Character:FindFirstChild('Gun') or hum.Health == 0 or workspace:FindFirstChild('GunDrop') == nil
- hasgun = true
- end
- end
- end
- if hasgun and hum.Health > 0 and killer and killer.Parent then
- -- aim at killer and wait till killer appear in sight
- myplr.CameraMode = 'LockFirstPerson'
- --[[repeat
- wait()
- until killerinsight() or hum.Health == 0 or stop]]
- -- spam 1 until equip the gun
- repeat
- vim:SendKeyEvent(true, Enum.KeyCode.One, false, game)
- vim:SendKeyEvent(false, Enum.KeyCode.One, false, game)
- wait()
- until myplr.Character:FindFirstChild('Gun') or stop or hum.Health == 0
- wait()
- myplr.Character.HumanoidRootPart.CFrame = killer.HumanoidRootPart.CFrame * CFrame.new(0,0,6)
- -- spam shoot until the game ends or we die
- while hum.Health > 0 and killer and killer.Parent and not stop do
- cam.CFrame = CFrame.new(cam.CFrame.p, killer.UpperTorso.Position)
- local vp = cam.ViewportSize
- vim:SendMouseButtonEvent(vp.X/2,vp.Y/2 , 0, true, game,1)
- vim:SendMouseButtonEvent(vp.X/2,vp.Y/2 , 0, false, game,1)
- run.Heartbeat:Wait()
- vim:SendKeyEvent(true, Enum.KeyCode.One, false, game)
- vim:SendKeyEvent(false, Enum.KeyCode.One, false, game)
- end
- myplr.CameraMode = 'Classic'
- end
- end
- end
- end
- end
- end)
- if not succ then warn(msg) end
- wait()
- end
- event:Disconnect()
- Noclip:Disconnect()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement