Advertisement
Guest User

Untitled

a guest
May 16th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.88 KB | None | 0 0
  1. local ot = tick()
  2.  
  3. local plr = game.Players.LocalPlayer
  4. local char,mouse = plr.Character,plr:GetMouse()
  5.  
  6. local mode = "script"
  7.  
  8. local amountParts = 3
  9. local offsetxd = 3
  10.  
  11. local frame = 0
  12. local oldTick = tick()
  13. local actualframe = 0
  14.  
  15. local whitelist = {"joalars2","0Popcorn3","Myt_h","Mariotigre","ammar104","Zwreida"}
  16.  
  17. local mouseMode = false
  18.  
  19. local tPos = Vector3.new(0,0,0)
  20.  
  21. local speed = 5
  22.  
  23. local mod = 40
  24.  
  25. local freezetab = {}
  26.  
  27. function circlePos(r,d,off) return off + Vector3.new(math.cos(math.rad(r))*d,0,math.sin(math.rad(r))*d) end
  28.  
  29. function search(t,tab)
  30. local searchtab = {}
  31. if tab then
  32. searchtab = tab
  33. end
  34. for i,v in pairs(t:GetChildren()) do
  35. table.insert(searchtab,v)
  36. search(v,searchtab)
  37. end
  38. return searchtab
  39. end
  40.  
  41. local r = 255
  42. local g = 0
  43. local b = 0
  44.  
  45. plr.Chatted:connect(function(c)
  46. if string.lower(string.sub(c,1,8)) == "!amount " then
  47. amountParts = tonumber(string.sub(c,9,#c))
  48. end
  49. if string.lower(string.sub(c,1,5)) == "!mod " then
  50. mod = tonumber(string.sub(c,6,#c))
  51. end
  52. if string.lower(string.sub(c,1,8)) == "!offset " then
  53. offsetxd = tonumber(string.sub(c,9,#c))
  54. end
  55. if string.lower(string.sub(c,1,7)) == "!speed " then
  56. speed = tonumber(string.sub(c,8,#c))
  57. end
  58. if string.lower(string.sub(c,1,12)) == "!mode script" then
  59. mode = "script"
  60. warn("Mode: Script Destruction")
  61. end
  62. if string.lower(string.sub(c,1,10)) == "!mode kill" then
  63. mode = "kill"
  64. warn("Mode: Character Killing")
  65. end
  66. if string.lower(string.sub(c,1,5)) == "!default" then
  67. script.Parent = plr
  68. wait(1)
  69. script.Parent = char
  70. end
  71. end)
  72.  
  73. mouse.KeyDown:connect(function(key)
  74. if key == "f" then
  75. if mouseMode == false then
  76. mouseMode = true
  77. else
  78. mouseMode = false
  79. end
  80. end
  81. end)
  82.  
  83. coroutine.resume(coroutine.create(function()
  84. while wait() do
  85. for i=0,255,10 do g = i wait() end
  86. for i=255,0,-10 do r = i wait() end
  87. for i=0,255,10 do b = i wait() end
  88. for i=255,0,-10 do g = i wait() end
  89. for i=0,255,10 do r = i wait() end
  90. for i=255,0,-10 do b = i wait() end
  91. end
  92. end))
  93.  
  94. game:GetService("RunService").RenderStepped:connect(function()
  95. actualframe = actualframe + 1
  96. frame = frame + speed
  97. local offset = offsetxd
  98. offset = offsetxd -- + math.cos(tick())*3
  99. if mouseMode == true then
  100. tPos = mouse.Hit.p + Vector3.new(0,3,0)
  101. else
  102. tPos = char:WaitForChild("Torso").Position
  103. end
  104. for i=1,360,(360)/amountParts do
  105. local p = Instance.new("Part")
  106. p.TopSurface = "Smooth"
  107. p.BottomSurface = "Smooth"
  108. p.Color = Color3.fromRGB(r,g,b)
  109. p.Material = "Neon"
  110. local dist = (circlePos(i + frame,offset,tPos + Vector3.new(0,math.cos((frame)/mod)*3,0)) - circlePos(i + frame - 1,offset,tPos + Vector3.new(0,math.cos((frame - 1)/mod)*3,0))).Magnitude*speed
  111. p.Size = Vector3.new(0.2,0.2,dist)
  112. p.CanCollide = false
  113. p.Anchored = true
  114. local m = Instance.new("BlockMesh",p)
  115. m.Scale = Vector3.new(1,1,1)
  116. p.CFrame = CFrame.new(circlePos(i + frame,offset,tPos + Vector3.new(0,math.cos((frame)/mod)*3,0)),circlePos(i + frame - 1,offset,tPos + Vector3.new(0,math.cos((frame - 1)/mod)*3,0))) * CFrame.new(0,0,-dist/2)
  117. p.Parent = workspace
  118. local update
  119. local updateframe = 0
  120.  
  121. update = game:GetService("RunService").RenderStepped:connect(function()
  122. updateframe = updateframe + 1
  123. m.Scale = m.Scale - Vector3.new(0.05,0.05,0)
  124. if updateframe >= 15 then
  125. p:Destroy()
  126. update:disconnect()
  127. end
  128. end)
  129. end
  130. oldTick = tick()
  131. if math.floor(actualframe/16) == actualframe/16 then
  132. for i,c in pairs(game:GetService("Players"):GetChildren()) do
  133. local isW = false
  134. for i,v in pairs(whitelist) do
  135. if c.Name == v then
  136. isW = true
  137. end
  138. end
  139. if c.Character.Parent == workspace then
  140. if isW == false then
  141. for i,v in pairs(search(c.Character)) do
  142. wait()
  143. if c ~= plr then
  144. if v:IsA("Part") or v:IsA("WedgePart") or v:IsA("TrussPart") or v:IsA("UnionOperation") then
  145. if (v.Position - tPos).Magnitude < offset then
  146. for i,v in pairs(v.Parent:GetChildren()) do
  147. if v:IsA("LocalScript") or v:IsA("Script") then
  148. v:Destroy()
  149. elseif v:IsA("Humanoid") then
  150. if mode == "kill" then
  151. v.MaxHealth = 1
  152. v.Health = 0
  153. v.Parent:BreakJoints()
  154. end
  155. end
  156. end
  157. if mode == "kill" then
  158. v:Destroy()
  159. end
  160. end
  161. end
  162. end
  163. end
  164. end
  165. end
  166. end
  167. end
  168. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement