Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _G.AccessoryRemove = false
- --[[ Turn _G.AccessoryRemove to true if you see accessory glitches with you, or another. ]] --
- local ViewPortGUI = Instance.new("ScreenGui", game.CoreGui)
- local Viewport = Instance.new("ViewportFrame", ViewPortGUI)
- local Players = game:GetService("Players")
- Viewport.CurrentCamera = workspace.CurrentCamera
- Viewport.Position = UDim2.new(0, 0, 0, -35)
- Viewport.Size = UDim2.new(1, 0, 1, 35)
- Viewport.BackgroundTransparency = 1
- -- Set up arrays to keep track of players who has been put into the VPF frame.
- local ReplicateList = {}
- local CloneList = {}
- -- Fundamental Parts of VPF Esp.
- local function AddPlayer(Player)
- if Player ~= Players.LocalPlayer then
- repeat wait() until Player.Character ~= nil
- local Character = Player.Character
- Character.Archivable = true
- local Clone = Character:Clone()
- CloneList[Player] = Clone
- Character.Archivable = false
- Clone.Parent = Viewport
- Clone.Name = ""
- for i,v in pairs(Character:GetChildren()) do
- if _G.AccessoryRemove then
- if v:IsA("Accessory") then
- v:Destroy()
- end
- end
- if v:IsA("BasePart") then
- ReplicateList[v] = Clone[v.Name]
- elseif v.ClassName == "Humanoid" then
- ReplicateList[v] = Clone[v.Name]
- end
- end
- end
- end
- local function RemovePlayer(Player)
- for i,v in pairs(Player:GetChildren()) do
- if ReplicateList[v] then ReplicateList[v] = nil end
- end
- if CloneList[Player] then
- CloneList[Player]:Destroy()
- end
- end
- Players.LocalPlayer.DevCameraOcclusionMode = "Invisicam"
- local function InitPlayer(Player)
- AddPlayer(Player)
- Player.CharacterAdded:Connect(function(Character)
- AddPlayer(Player)
- end)
- Player.CharacterRemoving:Connect(function(Character)
- RemovePlayer(Player)
- end)
- end
- for i,v in pairs(Players:GetPlayers()) do
- InitPlayer(v)
- end
- Players.PlayerAdded:Connect(InitPlayer)
- -- Keep track of players, so you actually see them moving.
- game:GetService("RunService").RenderStepped:Connect(function()
- for Original,Clone in pairs(ReplicateList) do
- if Original ~= nil and Clone ~= nil then
- if Original:IsA("BasePart") then
- pcall(function()
- Clone.CFrame = Original.CFrame
- end)
- else
- pcall(function()
- Clone.Health = Original.Health
- Clone.MaxHealth = Original.MaxHealth
- end)
- end
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement