local ReplicatedStorage = game:GetService('ReplicatedStorage') local MainKillersPath = ReplicatedStorage.Assets.Killers local IngamePlayers = workspace.Players local Spectators = IngamePlayers.Spectating local Method = '1x1x1x1 Zombie' -- or can be "c00lkidd Minion" assert(Method == '1x1x1x1 Zombie' or Method == 'c00lkidd Minion', 'Invalid invis method. Use either 1x1x1x1 Zombie or c00lkidd Minion') local ZombieSummon local MinionSummon local LocalPlayer = game:GetService('Players').LocalPlayer local Success, AnimId = xpcall(function() ZombieSummon = require(MainKillersPath['1x1x1x1'].Config).ZombieAnimations.Summon MinionSummon = require(MainKillersPath['c00lkidd'].Config).PizzaDeliveryAnimations.Summoned end, function(err) warn('Failed to load animation ID for invisibility due to:', err) end) if not MinionSummon then MinionSummon = 'rbxassetid://18886065814' end if not ZombieSummon then ZombieSummon = 'rbxassetid://75804462760596' end local CharacterAdded local function SetupInvis(Char) local AnimId = Method == '1x1x1x1 Zombie' and ZombieSummon or MinionSummon if not Animation then getgenv().Animation = Instance.new('Animation') Animation.AnimationId = AnimId end getgenv().AnimTrack = Char.Humanoid:LoadAnimation(Animation) AnimTrack:Play() AnimTrack:AdjustSpeed(0) AnimTrack.TimePosition = 0 end _G.InvisEnabled = not _G.InvisEnabled if _G.InvisEnabled then getgenv().Waiting = task.spawn(function() local Char = LocalPlayer.Character if Char and Char.Parent ~= Spectators then if not Char:WaitForChild('Humanoid', 10) then return warn('Invis: No humanoid') end SetupInvis(Char) end end) getgenv().InvisCharacterAdded = LocalPlayer.CharacterAdded:Connect(function(Char) if Char.Parent ~= Spectators then if not Char:WaitForChild('Humanoid', 10) then return warn('Invis: No humanoid') end SetupInvis(Char) end end) else if Waiting then getgenv().Waiting = task.cancel(Waiting) end if InvisCharacterAdded then getgenv().InvisCharacterAdded = InvisCharacterAdded:Disconnect() end if Animation then getgenv().Animation = Animation:Destroy() end if AnimTrack then getgenv().AnimTrack = AnimTrack:Stop() end end