Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.77 KB | None | 0 0
  1. local p = owner
  2. local char = p.Character
  3. local size = 8
  4. part = function()
  5.  
  6. local a = Instance.new("Part", script)
  7. a.Anchored = true
  8. a.CanCollide = true
  9. a.CFrame = char.Torso.CFrame
  10. a.Size = Vector3.new(size, 0.2, 0.2)
  11. a.Transparency = 1
  12. return a
  13. end
  14.  
  15. part2 = function()
  16.  
  17. local a = Instance.new("Part", script)
  18. a.Anchored = true
  19. a.CanCollide = true
  20. a.CFrame = char.Torso.CFrame
  21. a.Size = Vector3.new(0.2, size, 0.2)
  22. a.Transparency = 1
  23. return a
  24. end
  25.  
  26. part3 = function()
  27.  
  28. local a = Instance.new("Part", script)
  29. a.Anchored = true
  30. a.CanCollide = false
  31. a.Size = Vector3.new(size, size, 1)
  32. a.Transparency = 0.7
  33. a.Material = "Neon"
  34. a.BrickColor = BrickColor.new("Really red")
  35. local b = Instance.new("BlockMesh", a)
  36. b.Scale = Vector3.new(1, 1, 0)
  37. return a
  38. end
  39.  
  40. local replicating = false
  41. local root, a, b, d, a2, b2, c2, d2, aa, bb, cc, dd, z, x, c, v, b, n = nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil
  42. replicate = function()
  43.  
  44. replicating = true
  45. script:ClearAllChildren()
  46. root = part()
  47. root.Transparency = 1
  48. root.Size = Vector3.new(0.2, 0.2, 0.2)
  49. root.CanCollide = false
  50. a = part()
  51. b = part()
  52. d = part()
  53. a2 = part()
  54. b2 = part()
  55. c2 = part()
  56. d2 = part()
  57. aa = part2()
  58. bb = part2()
  59. cc = part2()
  60. dd = part2()
  61. z = part3()
  62. x = part3()
  63. v = part3()
  64. b = part3()
  65. n = part3()
  66. replicating = false
  67. end
  68.  
  69. script.ChildRemoved:connect(function(a)
  70.  
  71. if a.ClassName == "Part" and replicating == false then
  72. replicate()
  73. end
  74. end
  75. )
  76. replicate()
  77. local tick = 0
  78. CreateRegion3FromLocAndSize = function(Position, Size)
  79.  
  80. local SizeOffset = Size / 2
  81. local Point1 = Position - SizeOffset
  82. local Point2 = Position + SizeOffset
  83. return Region3.new(Point1, Point2)
  84. end
  85.  
  86. local set = false
  87. local whitelist = {"Hieroku", "PPATTA", "DevGamerzz", "I kill U", "kash5", "ZeroCrimson", "Zaidia", "tsup2", "PointCoded", "CLarramore", "Suzuuki", "Mastermarine_Plantte", "", ""}
  88. p.Chatted:connect(function(ms)
  89.  
  90. if ms:sub(1, 5) == "size-" then
  91. size = tonumber(ms:sub(6))
  92. replicate()
  93. else
  94. if ms:sub(1, 4) == "set-" then
  95. set = true
  96. z.CanCollide = false
  97. x.CanCollide = false
  98. c.CanCollide = false
  99. v.CanCollide = false
  100. b.CanCollide = false
  101. n.CanCollide = false
  102. else
  103. if ms:sub(1, 6) == "unset-" then
  104. set = false
  105. z.CanCollide = false
  106. x.CanCollide = false
  107. c.CanCollide = false
  108. v.CanCollide = false
  109. b.CanCollide = false
  110. n.CanCollide = false
  111. else
  112. if ms:sub(1, 10) == "whitelist-" then
  113. table.insert(whitelist, ms:sub(11))
  114. else
  115. if ms:sub(1, 12) == "unwhitelist-" then
  116. for i,v in pairs(whitelist) do
  117. if ms:sub(13) == v then
  118. table.remove(whitelist, i)
  119. break
  120. end
  121. end
  122. end
  123. end
  124. end
  125. end
  126. end
  127. end
  128. )
  129. local magicpos = nil
  130. game:GetService("RunService").Heartbeat:connect(function()
  131.  
  132. pcall(function()
  133.  
  134. local void = char:GetChildren()
  135. for _,pl in pairs(whitelist) do
  136. if game.Players:FindFirstChild(pl) ~= nil and game.Players:FindFirstChild(pl).Character ~= nil then
  137. for i,v in pairs(game.Players[pl].Character:GetChildren()) do
  138. table.insert(void, v)
  139. end
  140. end
  141. end
  142. for i,v in pairs(game.Players:GetPlayers()) do
  143. if v.Character:isDescendantOf(char) and not v.Name == "FangxWulf" then
  144. v:LoadCharacter()
  145. end
  146. end
  147. char.Humanoid.Health = math.huge
  148. tick = tick + 0.01
  149. if not set then
  150. root.CFrame = root.CFrame:lerp(CFrame.new(char.Torso.CFrame.p) * CFrame.Angles(math.sin(tick) * 100 / 30 / (size / 2), math.cos(tick) * 100 / 30 / (size / 2), math.cos(tick) * 100 / 30 / (size / 2)), 0.1)
  151. magicpos = char.Torso.CFrame
  152. else
  153. root.CFrame = root.CFrame:lerp(CFrame.new(magicpos.p) * CFrame.Angles(0, 0, 0), 0.05)
  154. end
  155. local reg = CreateRegion3FromLocAndSize(root.CFrame.p, Vector3.new(size, size, size))
  156. for i,v in pairs(game.Workspace:FindPartsInRegion3WithIgnoreList(reg, void, 100)) do
  157. if v.Name ~= "Base" then
  158. v:Destroy()
  159. end
  160. end
  161. a.CFrame = root.CFrame * CFrame.new(size / 2, size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  162. b.CFrame = root.CFrame * CFrame.new(-size / 2, size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  163. c.CFrame = root.CFrame * CFrame.new(0, size / 2, size / 2)
  164. d.CFrame = root.CFrame * CFrame.new(0, size / 2, -size / 2)
  165. a2.CFrame = root.CFrame * CFrame.new(size / 2, -size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  166. b2.CFrame = root.CFrame * CFrame.new(-size / 2, -size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  167. c2.CFrame = root.CFrame * CFrame.new(0, -size / 2, size / 2)
  168. d2.CFrame = root.CFrame * CFrame.new(0, -size / 2, -size / 2)
  169. aa.CFrame = root.CFrame * CFrame.new(size / 2, 0, size / 2)
  170. bb.CFrame = root.CFrame * CFrame.new(-size / 2, 0, size / 2)
  171. cc.CFrame = root.CFrame * CFrame.new(-size / 2, 0, -size / 2)
  172. dd.CFrame = root.CFrame * CFrame.new(size / 2, 0, -size / 2)
  173. z.CFrame = root.CFrame * CFrame.new(size / 2, 0, 0) * CFrame.Angles(0, math.rad(90), 0)
  174. x.CFrame = root.CFrame * CFrame.new(-size / 2, 0, 0) * CFrame.Angles(0, math.rad(90), 0)
  175. c.CFrame = root.CFrame * CFrame.new(0, 0, size / 2) * CFrame.Angles(0, 0, math.rad(90))
  176. v.CFrame = root.CFrame * CFrame.new(0, 0, -size / 2) * CFrame.Angles(0, 0, math.rad(90))
  177. b.CFrame = root.CFrame * CFrame.new(0, size / 2, 0) * CFrame.Angles(math.rad(90), 0, 0)
  178. n.CFrame = root.CFrame * CFrame.new(0, -size / 2, 0) * CFrame.Angles(math.rad(90), 0, 0)
  179. end
  180. )
  181. end
  182. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement