Advertisement
HenloMyDude

a cage for wild animals

Dec 14th, 2019
729
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1.  
  2. plr = owner
  3. char = plr.Character
  4. tors = char.Torso
  5.  
  6. local cage = Instance.new("Model",script)
  7. cage.Name = "Cage"
  8.  
  9. local floor = Instance.new("Part",cage)
  10. floor.Size = Vector3.new(tors.Size.y + 6, 1, tors.Size.y + 6)
  11. floor.CFrame = tors.CFrame * CFrame.new(0, -tors.Size.y - 0.5, 0)
  12. floor.Anchored = true
  13. floor.Transparency = 0.5
  14. local roof = Instance.new("Part",cage)
  15. roof.Size = Vector3.new(tors.Size.y + 6, 1, tors.Size.y + 6)
  16. roof.CFrame = tors.CFrame * CFrame.new(0, tors.Size.y + 4, 0)
  17. roof.Anchored = true
  18. roof.Transparency = 0.5
  19. local rwall = Instance.new("Part",cage)
  20. rwall.Size = Vector3.new(tors.Size.y - 1, tors.Size.y + tors.Size.y + 5, tors.Size.y + 6)
  21. rwall.CFrame = floor.CFrame * CFrame.new(floor.Size.x / 2, rwall.Size.y / 2, 0)
  22. rwall.Anchored = true
  23. rwall.Transparency = 0.5
  24. local lwall = Instance.new("Part",cage)
  25. lwall.Size = Vector3.new(tors.Size.y - 1, tors.Size.y + tors.Size.y + 5, tors.Size.y + 6)
  26. lwall.CFrame = floor.CFrame * CFrame.new(-floor.Size.x / 2, lwall.Size.y / 2, 0)
  27. lwall.Anchored = true
  28. lwall.Transparency = 0.5
  29. local fwall = Instance.new("Part",cage)
  30. fwall.Size = Vector3.new(tors.Size.y + 6, tors.Size.y + tors.Size.y + 5, tors.Size.y - 1)
  31. fwall.CFrame = floor.CFrame * CFrame.new(0, fwall.Size.y / 2, floor.Size.z / 2)
  32. fwall.Anchored = true
  33. fwall.Transparency = 0.5
  34. local bwall = Instance.new("Part",cage)
  35. bwall.Size = Vector3.new(tors.Size.y + 6, tors.Size.y + tors.Size.y + 5, tors.Size.y - 1)
  36. bwall.CFrame = floor.CFrame * CFrame.new(0, bwall.Size.y / 2, -floor.Size.z / 2)
  37. bwall.Anchored = true
  38. bwall.Transparency = 0.5
  39.  
  40. for i,v in pairs (cage:children()) do
  41. if v:IsA("Part") then
  42. v.Locked = true
  43. end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement