UniverseisCool

off

Oct 7th, 2017
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.12 KB | None | 0 0
  1. --Scripted By coolallball
  2. wait()
  3. local Player=game.Players.LocalPlayer
  4. repeat wait()
  5. until Player
  6. local Char=Player.Character
  7. repeat wait()
  8. until Char
  9. local CurrentEffects={}
  10. local CurrentDamages={}
  11. local Human=Char.Humanoid
  12. local LArm=Char["Left Arm"]
  13. local RArm=Char["Right Arm"]
  14. local LLeg=Char["Left Leg"]
  15. local RLeg=Char["Right Leg"]
  16. local Torso=Char.Torso
  17. local RS=Torso["Right Shoulder"]
  18. local LS=Torso["Left Shoulder"]
  19. local RH=Torso["Right Hip"]
  20. local LH=Torso["Left Hip"]
  21. local Head=Char.Head
  22. local Neck=Torso.Neck
  23. local RootPart=Char.HumanoidRootPart
  24. local RootJoint=RootPart.RootJoint
  25. local equipped=false
  26. local Debounce=false
  27. local Anim="Idle"
  28. local chat = game:GetService("Chat")
  29. local Mouse=Player:GetMouse()
  30. local Lighting=game.Lighting
  31. local cam=workspace.CurrentCamera
  32. local cf=CFrame.new
  33. local v3=Vector3.new
  34. local c3=Color3.new
  35. local it=Instance.new
  36. local angles=CFrame.Angles
  37. local rad=math.rad
  38. local ran=math.random
  39. local huge=math.huge
  40. local attacking=false
  41. Tool=script.Parent
  42. necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  43. LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  44. LSC0=cf(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  45. RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  46. RSC0=cf(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  47. ROOTC0 = cf(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  48. --why do people label stuff with comments, y.
  49. r=game:service'RunService'.RenderStepped
  50. clerp=function(a,b,t)
  51. return a:lerp(b,t)
  52. end
  53.  
  54. Inp=Player:GetChildren()
  55.  
  56. Human.WalkSpeed=16
  57. Human.JumpPower=50
  58.  
  59. for i=1,#Inp do
  60. if Inp[i]:IsA('Sound') then Inp[i]:Remove() end
  61. end
  62.  
  63. --Functions
  64.  
  65. function FindDist(a,b)
  66. return math.sqrt((b.p.x-a.p.x)^2+(b.p.y-a.p.y)^2+(b.p.z-a.p.z)^2)
  67. end
  68.  
  69. Round=function(Num)
  70. local mid=math.ceil(Num)
  71. mid=mid-.5
  72. if Num>=mid then
  73. return math.ceil(Num)
  74. else return math.floor(Num)
  75. end
  76. end
  77.  
  78. --Damage function
  79. function Damage(part,min,max,range,font)
  80. for i,v in pairs(workspace:GetChildren()) do
  81. if v:FindFirstChild('Humanoid') and v:FindFirstChild('Torso') and v.ClassName=="Model" and FindDist(part,v.Torso.CFrame)<=range and v.Name~= Player.Name then
  82. local dmg=Round(math.random(min,max))
  83. local bil=Instance.new("BillboardGui",v:FindFirstChild("Torso"))
  84. bil.Adornee=v:FindFirstChild("Torso")
  85. bil.Size=UDim2.new(0, 500, 0, 500)
  86. bil.ExtentsOffset=Vector3.new(ran(-3,3),ran(-3,3),ran(-3,3))
  87. local tx=Instance.new("TextLabel",bil)
  88. tx.Text=""..dmg..""
  89. tx.Font="Cartoon"
  90. tx.FontSize="Size60"
  91. tx.TextWrapped = false
  92. tx.TextStrokeTransparency = 0
  93. tx.TextColor = BrickColor.new("Pastel white")
  94. tx.TextXAlignment = "Center"
  95. tx.TextYAlignment = "Center"
  96. tx.TextWrapped = false
  97. tx.SizeConstraint = "RelativeXY"
  98. v:FindFirstChild('Humanoid'):TakeDamage(math.random(min,max))
  99. spawn(function()
  100. for ii=1,10 do r:wait()
  101. tx.TextTransparency=ii/10 end
  102. bil:Destroy() end)
  103. end end end
  104.  
  105.  
  106. --Folders+More functions
  107.  
  108. Effects=Instance.new("Folder",Char)
  109. Effects.Name="Effects"
  110. Sounds=Instance.new("Folder",Char)
  111. Sounds.Name="Sounds"
  112. part=function(parent,anchored,cancollide,size,cframe,col3,material,trans)
  113. local p=it("Part",parent)
  114. p.Anchored=anchored
  115. p.CanCollide=cancollide
  116. p.Size=size
  117. p.CFrame=cframe
  118. p.Color=col3
  119. p.Material=material
  120. p.Transparency=trans
  121. return p
  122. end
  123.  
  124. mesh=function(parent,ttype,scale)
  125. local m=it("SpecialMesh",parent)
  126. m.MeshType=ttype
  127. m.Scale=scale
  128. return m
  129. end
  130.  
  131. spmesh=function(parent,id,scale)
  132. local m=it("SpecialMesh",parent)
  133. m.MeshId=id
  134. m.Scale=scale
  135. return m
  136. end
  137.  
  138. local Smooth=function(Table)
  139. for _, v in pairs(Table) do
  140. if v.ClassName=="Part" then
  141. v.TopSurface,v.BottomSurface,v.BackSurface,v.FrontSurface,v.LeftSurface,v.RightSurface=10,10,10,10,10,10 end end
  142. end
  143.  
  144. clicked=false
  145. xing=false
  146. Mouse.Button1Down:connect(function(k)
  147. if (Mouse.hit.p-Torso.Position).magnitude<=150 then
  148. clicked=true end
  149. end)
  150.  
  151. DoStuff=function() spawn(function()
  152. clicked=false
  153. local from=part(Char,true,false,v3(1,1,1),Torso.CFrame*cf(ran(-5,5),0,ran(5,10)),c3(0,0,0),'Plastic',1)
  154.  
  155. local down=Ray.new(from.Position,v3(0,-999,0))
  156.  
  157. local partt,pos=workspace:FindPartOnRayWithIgnoreList(down,Char:children(),false,true)
  158. if partt then
  159. local ransize=math.random(3,5)
  160. local gfxb=part(Effects,true,false,v3(ransize,ransize,ransize),CFrame.new(pos)*cf(0,-ransize/2,0),partt.Color,partt.Material,partt.Transparency)
  161. gfxb.TopSurface=partt.TopSurface
  162. gfxb.BottomSurface=partt.BottomSurface
  163. gfxb.LeftSurface=partt.LeftSurface
  164. gfxb.RightSurface=partt.RightSurface
  165. gfxb.BackSurface=partt.BackSurface
  166. gfxb.FrontSurface=partt.FrontSurface
  167.  
  168. local fx=part(gfxb,false,false,v3(gfxb.Size.X+gfxb.Size.X/25,gfxb.Size.Y+gfxb.Size.X/25,gfxb.Size.Z+gfxb.Size.X/25),gfxb.CFrame,c3(1,1,0),"Neon",.85)
  169. spawn(function()
  170. while r:wait() do
  171. fx.CFrame=gfxb.CFrame
  172. end
  173. end)
  174. for _=1,70 do r:wait()
  175. gfxb.CFrame=gfxb.CFrame*angles(rad(1),rad(1),rad(1))+v3(0,8/70,0)
  176. end
  177.  
  178.  
  179. local DownFromFloaty=Ray.new(gfxb.Position,v3(0,-999,0))
  180. local partt,pos=workspace:FindPartOnRayWithIgnoreList(DownFromFloaty,Char:children(),false,true)
  181.  
  182. coroutine.resume(coroutine.create(function()
  183. repeat r:wait() spawn(function()
  184. if pos then
  185. local cir=part(Effects,true,false,v3(0,0,0),cf(pos)*angles(rad(-90),0,0),c3(1,1,0),"Plastic",0)
  186. local cm=spmesh(cir,"rbxassetid://3270017",v3(2,2,1))
  187. for i=1,50 do r:wait()
  188. cm.Scale=cm.Scale:Lerp(cm.Scale+v3(.4,.4,0),.3)
  189. cir.Transparency=i/50
  190. end
  191. cir:Destroy()
  192. end end) wait(.2)
  193. until clicked==true
  194. end))
  195.  
  196. repeat r:wait() gfxb.CFrame=gfxb.CFrame*angles(rad(1),rad(1),rad(1))+v3(0,.05*math.sin(tick()*2),0) until clicked==true
  197.  
  198. local bv=Instance.new('BodyVelocity',gfxb)
  199. bv.maxForce=v3(huge,huge,huge)
  200. bv.Velocity=(Mouse.hit.p-gfxb.Position).unit*150
  201.  
  202. local reach=part(Char,true,false,v3(1,1,1),Mouse.hit,c3(0,0,0),'Plastic',1)
  203.  
  204. gfxb.Anchored=false
  205. local waittime=0
  206. repeat r:wait()
  207. waittime=waittime+1/60
  208. until (reach.Position-gfxb.Position).Magnitude<=3 or waittime>7
  209. if waittime>7 then
  210. gfxb:Destroy()
  211. reach:Destroy()
  212. from:Destroy()
  213. xing=false
  214. elseif waittime<7 and (reach.Position-gfxb.Position).Magnitude<=3 then
  215. local down1=Ray.new(gfxb.Position,v3(0,-999,0))
  216. local partt1,pos1=workspace:FindPartOnRayWithIgnoreList(down1,Char:children(),false,true)
  217. if partt1 then
  218. gfxb.Anchored=true
  219. local ss={}
  220. Damage(gfxb.CFrame,40,80,gfxb.Size.x+.3)
  221. spawn(function()
  222. for p=1,15 do spawn(function()
  223. local b=part(Effects,false,true,v3(1,1,1),cf(pos1),partt1.Color,partt1.Material,partt1.Transparency)
  224. table.insert(ss,b)
  225. end)
  226. end
  227. end)
  228. spawn(function()
  229. for ii=1,7 do
  230. local s=part(Effects,true,true,v3(ran(5,8),3,ran(5,8)),cf(pos1)*cf(ran(-1,1),0,ran(-1,1))*angles(rad(ran(-10,10)),rad(ran(-10,10)),rad(ran(-10,10))),partt1.Color,partt1.Material,partt1.Transparency)
  231. table.insert(ss,s)
  232. end end)
  233. wait(4)
  234. for iv=1,#ss do spawn(function()
  235. for v=1,60 do r:wait()
  236. ss[iv].Transparency=v/60
  237. gfxb.Transparency=v/60
  238. fx.Transparency=.85+v/50
  239. end ss[iv]:Destroy()end)
  240. end
  241. end
  242. gfxb:Destroy()
  243. else
  244. gfxb:Destroy()
  245. reach:Destroy()
  246. from:Destroy()
  247. xing=false
  248. end
  249. else warn'No floor detected.'
  250. end
  251. end)
  252. end
  253.  
  254.  
  255. Mouse.KeyDown:connect(function(k)
  256. if k=="x" and xing==false then
  257. xing=true
  258. DoStuff()
  259. xing=false
  260. end
  261. end)
Add Comment
Please, Sign In to add comment