Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- plr = owner
- char = plr.Character
- tors = char.Torso
- local cage = Instance.new("Model",script)
- cage.Name = "Cage"
- local floor = Instance.new("Part",cage)
- floor.Size = Vector3.new(tors.Size.y + 6, 1, tors.Size.y + 6)
- floor.CFrame = tors.CFrame * CFrame.new(0, -tors.Size.y - 0.5, 0)
- floor.Anchored = true
- floor.Transparency = 0.5
- local roof = Instance.new("Part",cage)
- roof.Size = Vector3.new(tors.Size.y + 6, 1, tors.Size.y + 6)
- roof.CFrame = tors.CFrame * CFrame.new(0, tors.Size.y + 4, 0)
- roof.Anchored = true
- roof.Transparency = 0.5
- local rwall = Instance.new("Part",cage)
- rwall.Size = Vector3.new(tors.Size.y - 1, tors.Size.y + tors.Size.y + 5, tors.Size.y + 6)
- rwall.CFrame = floor.CFrame * CFrame.new(floor.Size.x / 2, rwall.Size.y / 2, 0)
- rwall.Anchored = true
- rwall.Transparency = 0.5
- local lwall = Instance.new("Part",cage)
- lwall.Size = Vector3.new(tors.Size.y - 1, tors.Size.y + tors.Size.y + 5, tors.Size.y + 6)
- lwall.CFrame = floor.CFrame * CFrame.new(-floor.Size.x / 2, lwall.Size.y / 2, 0)
- lwall.Anchored = true
- lwall.Transparency = 0.5
- local fwall = Instance.new("Part",cage)
- fwall.Size = Vector3.new(tors.Size.y + 6, tors.Size.y + tors.Size.y + 5, tors.Size.y - 1)
- fwall.CFrame = floor.CFrame * CFrame.new(0, fwall.Size.y / 2, floor.Size.z / 2)
- fwall.Anchored = true
- fwall.Transparency = 0.5
- local bwall = Instance.new("Part",cage)
- bwall.Size = Vector3.new(tors.Size.y + 6, tors.Size.y + tors.Size.y + 5, tors.Size.y - 1)
- bwall.CFrame = floor.CFrame * CFrame.new(0, bwall.Size.y / 2, -floor.Size.z / 2)
- bwall.Anchored = true
- bwall.Transparency = 0.5
- for i,v in pairs (cage:children()) do
- if v:IsA("Part") then
- v.Locked = true
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement