Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.79 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. c = part3()
  64. v = part3()
  65. b = part3()
  66. n = part3()
  67. replicating = false
  68. end
  69.  
  70. script.ChildRemoved:connect(function(a)
  71.  
  72. if a.ClassName == "Part" and replicating == false then
  73. replicate()
  74. end
  75. end
  76. )
  77. replicate()
  78. local tick = 0
  79. CreateRegion3FromLocAndSize = function(Position, Size)
  80.  
  81. local SizeOffset = Size / 2
  82. local Point1 = Position - SizeOffset
  83. local Point2 = Position + SizeOffset
  84. return Region3.new(Point1, Point2)
  85. end
  86.  
  87. local set = false
  88. local whitelist = {"Hieroku", "PPATTA", "DevGamerzz", "I kill U", "kash5", "ZeroCrimson", "Zaidia", "tsup2", "PointCoded", "CLarramore", "Suzuuki", "Mastermarine_Plantte", "", ""}
  89. p.Chatted:connect(function(ms)
  90.  
  91. if ms:sub(1, 5) == "size-" then
  92. size = tonumber(ms:sub(6))
  93. replicate()
  94. else
  95. if ms:sub(1, 4) == "set-" then
  96. set = true
  97. z.CanCollide = false
  98. x.CanCollide = false
  99. c.CanCollide = false
  100. v.CanCollide = false
  101. b.CanCollide = false
  102. n.CanCollide = false
  103. else
  104. if ms:sub(1, 6) == "unset-" then
  105. set = false
  106. z.CanCollide = false
  107. x.CanCollide = false
  108. c.CanCollide = false
  109. v.CanCollide = false
  110. b.CanCollide = false
  111. n.CanCollide = false
  112. else
  113. if ms:sub(1, 10) == "whitelist-" then
  114. table.insert(whitelist, ms:sub(11))
  115. else
  116. if ms:sub(1, 12) == "unwhitelist-" then
  117. for i,v in pairs(whitelist) do
  118. if ms:sub(13) == v then
  119. table.remove(whitelist, i)
  120. break
  121. end
  122. end
  123. end
  124. end
  125. end
  126. end
  127. end
  128. end
  129. )
  130. local magicpos = nil
  131. game:GetService("RunService").Heartbeat:connect(function()
  132.  
  133. pcall(function()
  134.  
  135. local void = char:GetChildren()
  136. for _,pl in pairs(whitelist) do
  137. if game.Players:FindFirstChild(pl) ~= nil and game.Players:FindFirstChild(pl).Character ~= nil then
  138. for i,v in pairs(game.Players[pl].Character:GetChildren()) do
  139. table.insert(void, v)
  140. end
  141. end
  142. end
  143. for i,v in pairs(game.Players:GetPlayers()) do
  144. if v.Character:isDescendantOf(char) and not v.Name == "FangxWulf" then
  145. v:LoadCharacter()
  146. end
  147. end
  148. char.Humanoid.Health = math.huge
  149. tick = tick + 0.01
  150. if not set then
  151. 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)
  152. magicpos = char.Torso.CFrame
  153. else
  154. root.CFrame = root.CFrame:lerp(CFrame.new(magicpos.p) * CFrame.Angles(0, 0, 0), 0.05)
  155. end
  156. local reg = CreateRegion3FromLocAndSize(root.CFrame.p, Vector3.new(size, size, size))
  157. for i,v in pairs(game.Workspace:FindPartsInRegion3WithIgnoreList(reg, void, 100)) do
  158. if v.Name ~= "Base" then
  159. v:Destroy()
  160. end
  161. end
  162. a.CFrame = root.CFrame * CFrame.new(size / 2, size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  163. b.CFrame = root.CFrame * CFrame.new(-size / 2, size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  164. c.CFrame = root.CFrame * CFrame.new(0, size / 2, size / 2)
  165. d.CFrame = root.CFrame * CFrame.new(0, size / 2, -size / 2)
  166. a2.CFrame = root.CFrame * CFrame.new(size / 2, -size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  167. b2.CFrame = root.CFrame * CFrame.new(-size / 2, -size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  168. c2.CFrame = root.CFrame * CFrame.new(0, -size / 2, size / 2)
  169. d2.CFrame = root.CFrame * CFrame.new(0, -size / 2, -size / 2)
  170. aa.CFrame = root.CFrame * CFrame.new(size / 2, 0, size / 2)
  171. bb.CFrame = root.CFrame * CFrame.new(-size / 2, 0, size / 2)
  172. cc.CFrame = root.CFrame * CFrame.new(-size / 2, 0, -size / 2)
  173. dd.CFrame = root.CFrame * CFrame.new(size / 2, 0, -size / 2)
  174. z.CFrame = root.CFrame * CFrame.new(size / 2, 0, 0) * CFrame.Angles(0, math.rad(90), 0)
  175. x.CFrame = root.CFrame * CFrame.new(-size / 2, 0, 0) * CFrame.Angles(0, math.rad(90), 0)
  176. c.CFrame = root.CFrame * CFrame.new(0, 0, size / 2) * CFrame.Angles(0, 0, math.rad(90))
  177. v.CFrame = root.CFrame * CFrame.new(0, 0, -size / 2) * CFrame.Angles(0, 0, math.rad(90))
  178. b.CFrame = root.CFrame * CFrame.new(0, size / 2, 0) * CFrame.Angles(math.rad(90), 0, 0)
  179. n.CFrame = root.CFrame * CFrame.new(0, -size / 2, 0) * CFrame.Angles(math.rad(90), 0, 0)
  180. end
  181. )
  182. end
  183. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement