local path = "LuaV/LuaV.lua"; if not(getgenv().luav) then if isfile(path) then loadstring(readfile(path))() else local data = game:HttpGet("https://raw.githubusercontent.com/fgdergewrgegr/all/refs/heads/main/LuaV") task.defer(writefile, path, data); loadstring(data)() end end; path = nil getgenv().tf_need = getgenv().tf_need or w:ci("Folder", {Name = "TileFolder_need"}) getgenv().tf_trash = getgenv().tf_trash or w:ci("Folder", {Name = "TileFolder_trash"}) getgenv().tf_nils = getgenv().tf_nils or w:ci("Folder", {Name = "TileFolder_nils"}) w.ChildAdded:Connect(function(prt) if prt.Name == "Tile" then qw(); prt.Parent = tf_need[1] end end) tf_trash.ChildAdded:Connect(function(prt) v3_to_part_lt[prt.Position] = LuaV(prt) if prt.Color == Color3.fromRGB(0, 255, 0) then prt.Color = Color3.fromRGB(255, 255, 0) elseif prt.Color ~= Color3.fromRGB(255, 0, 0) then prt.Color = Color3.fromRGB(0, 0, 0) end end) tf_nils.ChildAdded:Connect(function(prt) v3_to_part_lt[prt.Position] = LuaV(prt) prt.Color = Color3.fromRGB(0, 0, 255) end) for _,prt in w:gcwn("Tile") do prt.Parent = tf_need end getgenv().v3_to_part_lt = LuaV({}) or getgenv().v3_to_part_lt local function v3_to_part(v3) local find = v3_to_part_lt[v3] if find then return find else for _,prt in tf_need:gc() do if prt.Position == v3 then v3_to_part_lt[v3] = prt return prt end end end end getgenv().nums_lt = LuaV({}) or getgenv().nums_lt local function get_num(prt) local num = nums_lt[prt.Position]; if num then return num else if prt:ffc("ClickDetector") then return -1 end local decal = prt:ffc("Decal"); if decal then local texture = decal.Texture[1] if texture == "rbxassetid://12338627097" then num = 1 end if texture == "rbxassetid://12340336996" then num = 2 end if texture == "rbxassetid://12340350574" then num = 3 end if texture == "rbxassetid://12340351967" then num = 4 end if texture == "rbxassetid://12340352700" then num = 5 end if texture == "rbxassetid://12340353449" then num = 6 end if texture == "rbxassetid://132578265966305" then num = -2 end else num = 0 end; nums_lt[prt.Position] = num; return num end -- ghrp().CFrame = prt.CFrame + Vector3.new(0, 5, 0); qw(15) end getgenv()["3x3_lt"] = LuaV({}) or getgenv()["3x3_lt"] local function get_3x3(v3) local find = getgenv()["3x3_lt"][v3] if find then return find else local lt = { v3+Vector3.new(-5, 0, 5), v3+Vector3.new(0, 0, 5), v3+Vector3.new(5, 0, 5), v3+Vector3.new(-5, 0, 0), v3+Vector3.new(5, 0, 0), v3+Vector3.new(-5, 0, -5), v3+Vector3.new(0, 0, -5), v3+Vector3.new(5, 0, -5) }; getgenv()["3x3_lt"][v3] = lt return lt end end getgenv()["3x3_parts_lt"] = LuaV({}) or getgenv()["3x3_parts_lt"] local function get_3x3_parts(v3) local find = getgenv()["3x3_parts_lt"][v3] if find then return find else local lt = LuaV({}) for _, vv3 in get_3x3(v3) do lt:i(v3_to_part(vv3)) end; getgenv()["3x3_parts_lt"][v3] = lt return lt end end getgenv().check_bomb_lt = LuaV({}) or getgenv().check_bomb_lt local function check_bomb(prt) local find = check_bomb_lt[prt.Position] if find then return find elseif get_num(prt) == -2 then check_bomb_lt[prt.Position] = true return true end end local function check_nil(prt) if get_num(prt) == -1 and not(prt:ga("t")) then return true end end local function get_all(prt) local bombs, nils = LuaV({}), LuaV({}) for _,prtt in get_3x3_parts(prt.Position) do if check_bomb(prtt) then bombs:i(prtt) elseif check_nil(prtt) then nils:i(prtt) end end; return bombs, nils end getgenv().not_bomb_lt = LuaV({}) or getgenv().not_bomb_lt getgenv().work = true td(function() while work and qw() do for i,prt in not_bomb_lt do ghrp().CFrame = prt.CFrame + Vector3.new(0, 5, 0) pw(); not_bomb_lt[i] = nil prt.Parent = tf_need[1] end end end) while work and qw() do local count = 0 for _,prt in tf_need:gc() do local bombs, nils = get_all(prt) local bombs_count, nils_count = #bombs, #nils local part_num = get_num(prt) if nils_count == 0 then prt.Parent = tf_trash[1] elseif part_num == -1 and not(prt:ga("t")) then prt.Parent = tf_nils[1] elseif part_num == -2 then prt.Parent = tf_trash[1] else if debuging then ghrp().CFrame = prt.CFrame + Vector3.new(0, 5, 0) print("nils: "..nils_count, "bombs: "..bombs_count, "prt: "..part_num, "n+b: "..nils_count+bombs_count) print("not bomb: "..part_num == bombs_count, "bomb: "..part_num == nils_count+bombs_count) local rthrth = {} for _,prt1 in nils do rthrth[_] = prt1.Color prt1.Color = Color3.fromRGB(255, 0, 255) end; qw(1); for _,prt1 in nils do prt1.Color = rthrth[_] end local tyjtyj = {} for _,prt1 in bombs do tyjtyj[_] = prt1.Color prt1.Color = Color3.fromRGB(0, 0, 0) end; qw(1); for _,prt1 in bombs do prt1.Color = tyjtyj[_] end end if part_num == bombs_count then for _,prtt in nils do count = count + 1 prtt.Color = Color3.fromRGB(0, 255, 0) not_bomb_lt:i(prtt) prtt:sa("t", true) -- qw() end elseif nils_count == part_num-bombs_count then for _,prtt in nils do count = count + 1 prtt.Color = Color3.fromRGB(255, 0, 0) nums_lt[prtt.Position] = -2 check_bomb_lt[prtt.Position] = true prtt.Parent = tf_trash[1] -- qw() end end if debuging then qw(3) end end end; if count == 0 then qw(0.1) end end