if not game:IsLoaded() then
game.Loaded:Wait()
end
wait (5)
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local GuiService = game:GetService("GuiService")
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
player.CharacterAdded:Connect(function(newCharacter)
character = newCharacter
end)
local function isCorrectBreach(part)
if not part:FindFirstChild("Breach") then return false end
local breach = part.Breach
if breach.BrickColor.Name == "Toothpaste" then
return true
else
return false
end
end
local function teleportAndFirePrompt(part)
if not part:FindFirstChild("Breach") then return false end
if not part.Breach:FindFirstChild("ProximityPrompt") then return false end
if not isCorrectBreach(part) then
return false
end
local prompt = part.Breach.ProximityPrompt
local humanoid = character:FindFirstChild("Humanoid")
local hrp = character:FindFirstChild("HumanoidRootPart")
if not humanoid or not hrp then
return false
end
local teleportPosition = part.Position + Vector3.new(0, 3, 0)
hrp.CFrame = CFrame.new(teleportPosition)
task.wait(0.5)
fireproximityprompt(prompt)
local success, err = pcall(function()
local breach = player:WaitForChild("PlayerGui"):WaitForChild("Breach")
local container = breach:WaitForChild("Frame"):GetChildren()[4]
local innerFrame = container:WaitForChild("Frame"):WaitForChild("Frame")
local targetButton = innerFrame:GetChildren()[2]:GetChildren()
[5].Frame:FindFirstChild("TextButton")
if targetButton and targetButton:IsA("TextButton") then
GuiService.SelectedObject = targetButton
task.delay(1, function()
local vim = game:GetService("VirtualInputManager")
vim:SendKeyEvent(true, Enum.KeyCode.Return, false, game)
vim:SendKeyEvent(false, Enum.KeyCode.Return, false, game)
end)
end
end)
return true
end
local function monitorBreaches()
if not workspace:FindFirstChild("Lobby") then
repeat task.wait(1) until workspace:FindFirstChild("Lobby")
end
if not workspace.Lobby:FindFirstChild("Breaches") then
repeat task.wait(1) until workspace.Lobby:FindFirstChild("Breaches")
end
local breachesFolder = workspace.Lobby.Breaches
while true do
for _, part in pairs(breachesFolder:GetChildren()) do
if part:IsA("BasePart") and part:FindFirstChild("Breach") then
if isCorrectBreach(part) then
local success = teleportAndFirePrompt(part)
if success then
task.wait(10)
end
end
end
end
task.wait(1)
end
end
spawn(function()
if not player.Character then
character = player.CharacterAdded:Wait()
task.wait(5)
end
monitorBreaches()
end)