Advertisement
hipeopleofthisworld8

Untitled

Jul 2nd, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.29 KB | None | 0 0
  1. --erp...
  2. --.   .   .
  3. function bx()
  4. local tt = true
  5. local open = false
  6. mod = Instance.new("Model", owner.Character)
  7. mod.Name = owner.Name.. "'s protection box! v" ..math.random().. "." ..math.random().. "." ..math.random()-- the math.random is for the banisher guns, when they ban the model.
  8. o1 = Instance.new("Part", mod)
  9. o2 = Instance.new("Part", mod)
  10. o3 = Instance.new("Part", mod)
  11. o4 = Instance.new("Part", mod)
  12. o5 = Instance.new("Part", mod)
  13. o6 = Instance.new("Part", mod)
  14. o7 = Instance.new("Part", mod)
  15. o1.Size = Vector3.new(30, 1, 30)
  16. o2.Size = Vector3.new(1, 30, 30)
  17. o3.Size = Vector3.new(1, 30, 30)
  18. o4.Size = Vector3.new(30, 1, 30)
  19. o5.Size = Vector3.new(30, 30, 1)
  20. o6.Size = Vector3.new(30, 30, 1)
  21. o7.Size = Vector3.new(1, 1, 1)
  22. local function setAllSurfaces(part, surfaceType)
  23.     part.TopSurface = surfaceType
  24.     part.BottomSurface = surfaceType
  25.     part.LeftSurface = surfaceType
  26.     part.RightSurface = surfaceType
  27.     part.FrontSurface = surfaceType
  28.     part.BackSurface = surfaceType
  29. end
  30. for i, v in pairs(mod:GetChildren()) do
  31. if v:IsA("BasePart") then
  32. v.Transparency = 0.5
  33. setAllSurfaces(v, "Smooth")
  34. end
  35. end
  36. o7.Transparency = 1
  37. o7.CanCollide = false
  38. mod.PrimaryPart = o7
  39. o1.Anchored = true
  40. o2.Anchored = true
  41. o3.Anchored = true
  42. o4.Anchored = true
  43. o5.Anchored = true
  44. o6.Anchored = true
  45. o7.Anchored = true
  46. o1.Position = Vector3.new(0, 30, 0)
  47. o2.Position = Vector3.new(14.5, 15, 0)
  48. o3.Position = Vector3.new(-14.5, 15, 0)
  49. o5.Position = Vector3.new(0, 15, -14.5)
  50. o6.Position = Vector3.new(0, 15, 14.5)
  51. o7.Position = Vector3.new(0, 15, 0)
  52. while wait() do
  53. if tt == true then
  54. mod:SetPrimaryPartCFrame(owner.Character.Torso.CFrame)
  55. end
  56. end
  57. function open(v)
  58. v.Transparency = 0.75
  59. v.CanCollide = false
  60. wait(3)
  61. v.Transparency = 0.5
  62. v.CanCollide = true
  63. end
  64. function touch(p)
  65. if tt == true then
  66. p:ClearAllChildren()
  67. elseif open == true then
  68. open(o1)
  69. open(o2)
  70. open(o3)
  71. open(o4)
  72. open(o5)
  73. open(o6)
  74. end
  75. owner.Chatted:connect(function(mess)
  76. if mess:sub(1,8) == "unfollow" then
  77. tt = false
  78. elseif mess:sub(1,6) == "follow" then
  79. tt = true
  80. end
  81. end)
  82. o1.Touched:Connect(touch)
  83. o2.Touched:Connect(touch)
  84. o3.Touched:Connect(touch)
  85. o4.Touched:Connect(touch)
  86. o5.Touched:Connect(touch)
  87. o6.Touched:Connect(touch)
  88. end
  89. end
  90. while wait() do
  91. if mod == nil then
  92. bx()
  93. end
  94. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement