Advertisement
PasteBinHacks

VPF (for only singular parts)

Aug 7th, 2022
937
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.09 KB | None | 0 0
  1. -- Set the script to local script, and put it inside of the frame that holds the vpf, make sure you make a instance called "World Model", and place it inside of your vpf. (YOU CAN DELETE THIS IF YOU WANT)
  2. local cam = Instance.new("Camera", script.Parent)
  3. local toolCam = Instance.new("Camera", script.Parent)
  4. local rs = game:GetService("RunService")
  5.  
  6. local owned = false
  7.  
  8. rs.RenderStepped:Connect(function()
  9.     if owned == true then
  10.         local char = game.Players.LocalPlayer.OwnedBlocks:FindFirstChild(script.Parent.Name)
  11.         local VPFcam = Instance.new("Camera"); VPFcam.Parent = script.Parent.ViewportFrame
  12.         VPFcam.CFrame = CFrame.new(0,0,0)
  13.         script.Parent.ViewportFrame.CurrentCamera = VPFcam
  14.  
  15.         repeat wait(.1) until game:IsLoaded()
  16.  
  17.         char.Archivable = true
  18.  
  19.         local ClonedChar = char:Clone()
  20.  
  21.         ClonedChar.Parent = script.Parent.ViewportFrame.WorldModel
  22.         ClonedChar.CFrame = (CFrame.new(Vector3.new(0,0,-3.5),Vector3.new(0,0,0)))
  23.     end
  24.    
  25.     if game.Players.LocalPlayer.OwnedBlocks:FindFirstChild(script.Parent.Name) then
  26.         owned = true
  27.     else
  28.         owned = false
  29.     end
  30.    
  31.     print(owned)
  32. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement