dylan12312

Untitled

Jan 18th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.83 KB | None | 0 0
  1. local p = game.Players.LocalPlayer
  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. }
  27. local Rainbow = { --This is the main color set. Try to use more than just a few, make it fade in order as well
  28. "Crimson",
  29. "Bright red",
  30. "Neon orange",
  31. "Deep orange",
  32. "Bright yellow",
  33. "New Yeller",
  34. "Br. yellowish green",
  35. "Lime green",
  36. "Sea green",
  37. "Bright bluish green",
  38. "Bright blue",
  39. "Lavender",
  40. "Royal purple",
  41. "Eggplant",
  42. "Hot pink"
  43. }
  44.  
  45. local replicating = false
  46. local root, a, b, c, 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
  47. replicate = function()
  48.  
  49. replicating = true
  50. script:ClearAllChildren()
  51. root = part()
  52. root.Transparency = 1
  53. root.Size = Vector3.new(0.2, 0.2, 0.2)
  54. root.CanCollide = false
  55. a = part()
  56. b = part()
  57. c = part()
  58. d = part()
  59. a2 = part()
  60. b2 = part()
  61. c2 = part()
  62. d2 = part()
  63. aa = part2()
  64. bb = part2()
  65. cc = part2()
  66. dd = part2()
  67. z = part3()
  68. x = part3()
  69. c = part3()
  70. v = part3()
  71. b = part3()
  72. n = part3()
  73. replicating = false
  74. end
  75.  
  76. script.ChildRemoved:connect(function(a)
  77.  
  78. if a.ClassName == "Part" and replicating == false then
  79. replicate()
  80. end
  81. end
  82. )
  83. replicate()
  84. local tick = 0
  85. CreateRegion3FromLocAndSize = function(Position, Size)
  86.  
  87. local SizeOffset = Size / 2
  88. local Point1 = Position - SizeOffset
  89. local Point2 = Position + SizeOffset
  90. return Region3.new(Point1, Point2)
  91. end
  92.  
  93. local set = false
  94. local whitelist = {"Hieroku", "PPATTA", "DevGamerzz", "I kill U", "kash5", "ZeroCrimson", "Zaidia", "tsup2", "PointCoded", "CLarramore", "Suzuuki", "", "", ""}
  95. p.Chatted:connect(function(ms)
  96.  
  97. if ms:sub(1, 5) == "size-" then
  98. size = tonumber(ms:sub(6))
  99. replicate()
  100. else
  101. if ms:sub(1, 4) == "set-" then
  102. set = true
  103. z.CanCollide = false
  104. x.CanCollide = false
  105. c.CanCollide = false
  106. v.CanCollide = false
  107. b.CanCollide = false
  108. n.CanCollide = false
  109. else
  110. if ms:sub(1, 6) == "unset-" then
  111. set = false
  112. z.CanCollide = false
  113. x.CanCollide = false
  114. c.CanCollide = false
  115. v.CanCollide = false
  116. b.CanCollide = false
  117. n.CanCollide = false
  118. else
  119. if ms:sub(1, 10) == "whitelist-" then
  120. table.insert(whitelist, ms:sub(11))
  121. else
  122. if ms:sub(1, 12) == "unwhitelist-" then
  123. for i,v in pairs(whitelist) do
  124. if ms:sub(13) == v then
  125. table.remove(whitelist, i)
  126. break
  127. end
  128. end
  129. end
  130. end
  131. end
  132. end
  133. end
  134. end
  135. )
  136. local magicpos = nil
  137. game:GetService("RunService").Heartbeat:connect(function()
  138.  
  139. pcall(function()
  140.  
  141. local void = char:GetChildren()
  142. for _,pl in pairs(whitelist) do
  143. if game.Players:FindFirstChild(pl) ~= nil and game.Players:FindFirstChild(pl).Character ~= nil then
  144. for i,v in pairs(game.Players[pl].Character:GetChildren()) do
  145. table.insert(void, v)
  146. end
  147. end
  148. end
  149. for i,v in pairs(game.Players:GetPlayers()) do
  150. if v.Character:isDescendantOf(char) and not v.Name == "FangxWulf" then
  151. v:LoadCharacter()
  152. end
  153. end
  154. char.Humanoid.Health = math.huge
  155. tick = tick + 0.01
  156. if not set then
  157. 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)
  158. magicpos = char.Torso.CFrame
  159. else
  160. root.CFrame = root.CFrame:lerp(CFrame.new(magicpos.p) * CFrame.Angles(0, 0, 0), 0.05)
  161. end
  162. local reg = CreateRegion3FromLocAndSize(root.CFrame.p, Vector3.new(size, size, size))
  163. for i,v in pairs(game.Workspace:FindPartsInRegion3WithIgnoreList(reg, void, 100)) do
  164. if v.Name ~= "Base" then
  165. v:Destroy()
  166. end
  167. end
  168. a.CFrame = root.CFrame * CFrame.new(size / 2, size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  169. b.CFrame = root.CFrame * CFrame.new(-size / 2, size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  170. c.CFrame = root.CFrame * CFrame.new(0, size / 2, size / 2)
  171. d.CFrame = root.CFrame * CFrame.new(0, size / 2, -size / 2)
  172. a2.CFrame = root.CFrame * CFrame.new(size / 2, -size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  173. b2.CFrame = root.CFrame * CFrame.new(-size / 2, -size / 2, 0) * CFrame.Angles(0, math.rad(90), 0)
  174. c2.CFrame = root.CFrame * CFrame.new(0, -size / 2, size / 2)
  175. d2.CFrame = root.CFrame * CFrame.new(0, -size / 2, -size / 2)
  176. aa.CFrame = root.CFrame * CFrame.new(size / 2, 0, size / 2)
  177. bb.CFrame = root.CFrame * CFrame.new(-size / 2, 0, size / 2)
  178. cc.CFrame = root.CFrame * CFrame.new(-size / 2, 0, -size / 2)
  179. dd.CFrame = root.CFrame * CFrame.new(size / 2, 0, -size / 2)
  180. z.CFrame = root.CFrame * CFrame.new(size / 2, 0, 0) * CFrame.Angles(0, math.rad(90), 0)
  181. x.CFrame = root.CFrame * CFrame.new(-size / 2, 0, 0) * CFrame.Angles(0, math.rad(90), 0)
  182. c.CFrame = root.CFrame * CFrame.new(0, 0, size / 2) * CFrame.Angles(0, 0, math.rad(90))
  183. v.CFrame = root.CFrame * CFrame.new(0, 0, -size / 2) * CFrame.Angles(0, 0, math.rad(90))
  184. b.CFrame = root.CFrame * CFrame.new(0, size / 2, 0) * CFrame.Angles(math.rad(90), 0, 0)
  185. n.CFrame = root.CFrame * CFrame.new(0, -size / 2, 0) * CFrame.Angles(math.rad(90), 0, 0)
  186. end
  187. )
  188. end
  189. )
Advertisement
Add Comment
Please, Sign In to add comment