Advertisement
UiiN2IPCEO

deadly laser v3

Jul 26th, 2018
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.41 KB | None | 0 0
  1. --[[
  2. SUN IS A DEADLY LASER SCRIPT
  3. { NOT ANYMORE THERE'S A BLANKET! }
  4. Created by Minty_Latios (ROBLOX)
  5. MintyLatios (V3rmillion)
  6. Minty Latios#1938
  7.  
  8.  
  9. --]]
  10. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  11. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  12. do
  13. print("FE Compatibility code by Mokiros")
  14. script.Parent = Player.Character
  15.  
  16. --RemoteEvent for communicating
  17. local Event = Instance.new("RemoteEvent")
  18. Event.Name = "UserInput_Event"
  19.  
  20. --Fake event to make stuff like Mouse.KeyDown work
  21. local function fakeEvent()
  22. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  23. t.connect = t.Connect
  24. return t
  25. end
  26.  
  27. --Creating fake input objects with fake variables
  28. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  29. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  30. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  31. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  32. end}
  33. --Merged 2 functions into one by checking amount of arguments
  34. CAS.UnbindAction = CAS.BindAction
  35.  
  36. --This function will trigger the events that have been :Connect()'ed
  37. local function te(self,ev,...)
  38. local t = m[ev]
  39. if t and t._fakeEvent and t.Function then
  40. t.Function(...)
  41. end
  42. end
  43. m.TrigEvent = te
  44. UIS.TrigEvent = te
  45.  
  46. Event.OnServerEvent:Connect(function(plr,io)
  47. if plr~=Player then return end
  48. if io.isMouse then
  49. m.Target = io.Target
  50. m.Hit = io.Hit
  51. else
  52. local b = io.UserInputState == Enum.UserInputState.Begin
  53. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  54. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  55. end
  56. for _,t in pairs(CAS.Actions) do
  57. for _,k in pairs(t.Keys) do
  58. if k==io.KeyCode then
  59. t.Function(t.Name,io.UserInputState,io)
  60. end
  61. end
  62. end
  63. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  64. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  65. end
  66. end)
  67. Event.Parent = NLS([==[
  68. local Player = game:GetService("Players").LocalPlayer
  69. local Event = script:WaitForChild("UserInput_Event")
  70.  
  71. local UIS = game:GetService("UserInputService")
  72. local input = function(io,a)
  73. if a then return end
  74. --Since InputObject is a client-side instance, we create and pass table instead
  75. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  76. end
  77. UIS.InputBegan:Connect(input)
  78. UIS.InputEnded:Connect(input)
  79.  
  80. local Mouse = Player:GetMouse()
  81. local h,t
  82. --Give the server mouse data 30 times every second, but only if the values changed
  83. --If player is not moving their mouse, client won't fire events
  84. while wait(1/30) do
  85. if h~=Mouse.Hit or t~=Mouse.Target then
  86. h,t=Mouse.Hit,Mouse.Target
  87. Event:FireServer({isMouse=true,Target=t,Hit=h})
  88. end
  89. end]==],Player.Character)
  90. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  91. end
  92.  
  93. wait(1 / 60)
  94. Effects = { }
  95. local Player = owner
  96. local Character = Player.Character
  97. local Humanoid = Character.Humanoid
  98. local LeftArm = Character["Left Arm"]
  99. local RightArm = Character["Right Arm"]
  100. local LeftLeg = Character["Left Leg"]
  101. local RightLeg = Character["Right Leg"]
  102. local Head = Character.Head
  103. local Torso = Character.Torso
  104. local Camera = game.Workspace.CurrentCamera
  105. local RootPart = Character.HumanoidRootPart
  106. local RootJoint = RootPart.RootJoint
  107. local attack = false
  108. local Anim = 'Idle'
  109. local attacktype = 1
  110. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  111. local velocity = RootPart.Velocity.y
  112. local sine = 0
  113. local change = 1
  114. local Create = LoadLibrary("RbxUtility").Create
  115.  
  116. local m = Create("Model"){
  117. Parent = Character,
  118. Name = "WeaponModel",
  119. }
  120.  
  121. Humanoid.Animator.Parent = nil
  122. Character.Animate.Parent = nil
  123.  
  124. local newMotor = function(part0, part1, c0, c1)
  125. local w = Create('Motor'){
  126. Parent = part0,
  127. Part0 = part0,
  128. Part1 = part1,
  129. C0 = c0,
  130. C1 = c1,
  131. }
  132. return w
  133. end
  134.  
  135. function clerp(a, b, t)
  136. return a:lerp(b, t)
  137. end
  138.  
  139. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  140. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  141.  
  142. local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  143. local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  144. local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
  145. local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
  146. RootJoint.C1 = CFrame.new(0, 0, 0)
  147. RootJoint.C0 = CFrame.new(0, 0, 0)
  148. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  149. Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
  150.  
  151. local rarmc1 = RW.C1
  152. local larmc1 = LW.C1
  153. local rlegc1 = RH.C1
  154. local llegc1 = LH.C1
  155.  
  156. local resetc1 = false
  157.  
  158. function PlayAnimationFromTable(table, speed, bool)
  159. RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  160. Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  161. RW.C0 = clerp(RW.C0, table[3], speed)
  162. LW.C0 = clerp(LW.C0, table[4], speed)
  163. RH.C0 = clerp(RH.C0, table[5], speed)
  164. LH.C0 = clerp(LH.C0, table[6], speed)
  165. if bool == true then
  166. if resetc1 == false then
  167. resetc1 = true
  168. RootJoint.C1 = RootJoint.C1
  169. Torso.Neck.C1 = Torso.Neck.C1
  170. RW.C1 = rarmc1
  171. LW.C1 = larmc1
  172. RH.C1 = rlegc1
  173. LH.C1 = llegc1
  174. end
  175. end
  176. end
  177.  
  178. ArtificialHB = Create("BindableEvent", script){
  179. Parent = script,
  180. Name = "Heartbeat",
  181. }
  182.  
  183. script:WaitForChild("Heartbeat")
  184.  
  185. frame = 1 / 30
  186. tf = 0
  187. allowframeloss = false
  188. tossremainder = false
  189. lastframe = tick()
  190. script.Heartbeat:Fire()
  191.  
  192. game:GetService("RunService").Heartbeat:connect(function(s, p)
  193. tf = tf + s
  194. if tf >= frame then
  195. if allowframeloss then
  196. script.Heartbeat:Fire()
  197. lastframe = tick()
  198. else
  199. for i = 1, math.floor(tf / frame) do
  200. script.Heartbeat:Fire()
  201. end
  202. lastframe = tick()
  203. end
  204. if tossremainder then
  205. tf = 0
  206. else
  207. tf = tf - frame * math.floor(tf / frame)
  208. end
  209. end
  210. end)
  211.  
  212. function swait(num)
  213. if num == 0 or num == nil then
  214. ArtificialHB.Event:wait()
  215. else
  216. for i = 0, num do
  217. ArtificialHB.Event:wait()
  218. end
  219. end
  220. end
  221.  
  222. function RemoveOutlines(part)
  223. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  224. end
  225.  
  226. CFuncs = {
  227. ["Part"] = {
  228. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  229. local Part = Create("Part"){
  230. Parent = Parent,
  231. Reflectance = Reflectance,
  232. Transparency = Transparency,
  233. CanCollide = false,
  234. Locked = true,
  235. BrickColor = BrickColor.new(tostring(BColor)),
  236. Name = Name,
  237. Size = Size,
  238. Material = Material,
  239. }
  240. RemoveOutlines(Part)
  241. return Part
  242. end;
  243. };
  244.  
  245. ["Mesh"] = {
  246. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  247. local Msh = Create(Mesh){
  248. Parent = Part,
  249. Offset = OffSet,
  250. Scale = Scale,
  251. }
  252. if Mesh == "SpecialMesh" then
  253. Msh.MeshType = MeshType
  254. Msh.MeshId = MeshId
  255. end
  256. return Msh
  257. end;
  258. };
  259.  
  260. ["Mesh"] = {
  261. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  262. local Msh = Create(Mesh){
  263. Parent = Part,
  264. Offset = OffSet,
  265. Scale = Scale,
  266. }
  267. if Mesh == "SpecialMesh" then
  268. Msh.MeshType = MeshType
  269. Msh.MeshId = MeshId
  270. end
  271. return Msh
  272. end;
  273. };
  274.  
  275. ["Weld"] = {
  276. Create = function(Parent, Part0, Part1, C0, C1)
  277. local Weld = Create("Weld"){
  278. Parent = Parent,
  279. Part0 = Part0,
  280. Part1 = Part1,
  281. C0 = C0,
  282. C1 = C1,
  283. }
  284. return Weld
  285. end;
  286. };
  287.  
  288. ["Sound"] = {
  289. Create = function(id, par, vol, pit)
  290. coroutine.resume(coroutine.create(function()
  291. local S = Create("Sound"){
  292. Volume = vol,
  293. Pitch = pit or 1,
  294. SoundId = id,
  295. Parent = par or workspace,
  296. }
  297. wait()
  298. S:play()
  299. game:GetService("Debris"):AddItem(S, 6)
  300. end))
  301. end;
  302. };
  303.  
  304. ["ParticleEmitter"] = {
  305. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  306. local fp = Create("ParticleEmitter"){
  307. Parent = Parent,
  308. Color = ColorSequence.new(Color1, Color2),
  309. LightEmission = LightEmission,
  310. Size = Size,
  311. Texture = Texture,
  312. Transparency = Transparency,
  313. ZOffset = ZOffset,
  314. Acceleration = Accel,
  315. Drag = Drag,
  316. LockedToPart = LockedToPart,
  317. VelocityInheritance = VelocityInheritance,
  318. EmissionDirection = EmissionDirection,
  319. Enabled = Enabled,
  320. Lifetime = LifeTime,
  321. Rate = Rate,
  322. Rotation = Rotation,
  323. RotSpeed = RotSpeed,
  324. Speed = Speed,
  325. VelocitySpread = VelocitySpread,
  326. }
  327. return fp
  328. end;
  329. };
  330.  
  331. CreateTemplate = {
  332.  
  333. };
  334. }
  335.  
  336. function rayCast(Position, Direction, Range, Ignore)
  337. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  338. end
  339.  
  340. FindNearestTorso = function(pos)
  341. local list = (game.Workspace:children())
  342. local torso = nil
  343. local dist = 1000
  344. local temp, human, temp2 = nil, nil, nil
  345. for x = 1, #list do
  346. temp2 = list[x]
  347. if temp2.className == "Model" and temp2.Name ~= Character.Name then
  348. temp = temp2:findFirstChild("Torso")
  349. human = temp2:findFirstChild("Humanoid")
  350. if temp ~= nil and human ~= nil and human.Health > 0 and (temp.Position - pos).magnitude < dist then
  351. local dohit = true
  352. if dohit == true then
  353. torso = temp
  354. dist = (temp.Position - pos).magnitude
  355. end
  356. end
  357. end
  358. end
  359. return torso, dist
  360. end
  361.  
  362. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  363. if hit.Parent == nil then
  364. return
  365. end
  366. local h = hit.Parent:FindFirstChild("Humanoid")
  367. for _, v in pairs(hit.Parent:children()) do
  368. if v:IsA("Humanoid") then
  369. h = v
  370. end
  371. end
  372. if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  373. if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  374. if hit.Parent.DebounceHit.Value == true then
  375. return
  376. end
  377. end
  378. local c = Create("ObjectValue"){
  379. Name = "creator",
  380. Value = game:service("Players").LocalPlayer,
  381. Parent = h,
  382. }
  383. game:GetService("Debris"):AddItem(c, .5)
  384. if HitSound ~= nil and HitPitch ~= nil then
  385. CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  386. end
  387. local Damage = math.random(minim, maxim)
  388. local blocked = false
  389. local block = hit.Parent:findFirstChild("Block")
  390. if block ~= nil then
  391. if block.className == "IntValue" then
  392. if block.Value > 0 then
  393. blocked = true
  394. block.Value = block.Value - 1
  395. print(block.Value)
  396. end
  397. end
  398. end
  399. if blocked == false then
  400. h.Health = h.Health - Damage
  401. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Really black").Color)
  402. else
  403. h.Health = h.Health - (Damage / 2)
  404. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, BrickColor.new("Really black").Color)
  405. end
  406. if Type == "Knockdown" then
  407. local hum = hit.Parent.Humanoid
  408. hum.PlatformStand = true
  409. coroutine.resume(coroutine.create(function(HHumanoid)
  410. swait(1)
  411. HHumanoid.PlatformStand = false
  412. end), hum)
  413. local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  414. local bodvol = Create("BodyVelocity"){
  415. velocity = angle * knockback,
  416. P = 5000,
  417. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  418. Parent = hit,
  419. }
  420. local rl = Create("BodyAngularVelocity"){
  421. P = 3000,
  422. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  423. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  424. Parent = hit,
  425. }
  426. game:GetService("Debris"):AddItem(bodvol, .5)
  427. game:GetService("Debris"):AddItem(rl, .5)
  428. elseif Type == "Normal" then
  429. local vp = Create("BodyVelocity"){
  430. P = 500,
  431. maxForce = Vector3.new(math.huge, 0, math.huge),
  432. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  433. }
  434. if knockback > 0 then
  435. vp.Parent = hit.Parent.Torso
  436. end
  437. game:GetService("Debris"):AddItem(vp, .5)
  438. elseif Type == "Up" then
  439. local bodyVelocity = Create("BodyVelocity"){
  440. velocity = Vector3.new(0, 20, 0),
  441. P = 5000,
  442. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  443. Parent = hit,
  444. }
  445. game:GetService("Debris"):AddItem(bodyVelocity, .5)
  446. elseif Type == "DarkUp" then
  447. coroutine.resume(coroutine.create(function()
  448. for i = 0, 1, 0.1 do
  449. swait()
  450. Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
  451. end
  452. end))
  453. local bodyVelocity = Create("BodyVelocity"){
  454. velocity = Vector3.new(0, 20, 0),
  455. P = 5000,
  456. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  457. Parent = hit,
  458. }
  459. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  460. elseif Type == "Snare" then
  461. local bp = Create("BodyPosition"){
  462. P = 2000,
  463. D = 100,
  464. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  465. position = hit.Parent.Torso.Position,
  466. Parent = hit.Parent.Torso,
  467. }
  468. game:GetService("Debris"):AddItem(bp, 1)
  469. elseif Type == "Freeze" then
  470. local BodPos = Create("BodyPosition"){
  471. P = 50000,
  472. D = 1000,
  473. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  474. position = hit.Parent.Torso.Position,
  475. Parent = hit.Parent.Torso,
  476. }
  477. local BodGy = Create("BodyGyro") {
  478. maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  479. P = 20e+003,
  480. Parent = hit.Parent.Torso,
  481. cframe = hit.Parent.Torso.CFrame,
  482. }
  483. hit.Parent.Torso.Anchored = true
  484. coroutine.resume(coroutine.create(function(Part)
  485. swait(1.5)
  486. Part.Anchored = false
  487. end), hit.Parent.Torso)
  488. game:GetService("Debris"):AddItem(BodPos, 3)
  489. game:GetService("Debris"):AddItem(BodGy, 3)
  490. end
  491. local debounce = Create("BoolValue"){
  492. Name = "DebounceHit",
  493. Parent = hit.Parent,
  494. Value = true,
  495. }
  496. game:GetService("Debris"):AddItem(debounce, Delay)
  497. c = Create("ObjectValue"){
  498. Name = "creator",
  499. Value = Player,
  500. Parent = h,
  501. }
  502. game:GetService("Debris"):AddItem(c, .5)
  503. end
  504. end
  505.  
  506. function ShowDamage(Pos, Text, Time, Color)
  507. local Rate = (1 / 30)
  508. local Pos = (Pos or Vector3.new(0, 0, 0))
  509. local Text = (Text or "")
  510. local Time = (Time or 2)
  511. local Color = (Color or Color3.new(1, 0, 1))
  512. local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  513. EffectPart.Anchored = true
  514. local BillboardGui = Create("BillboardGui"){
  515. Size = UDim2.new(3, 0, 3, 0),
  516. Adornee = EffectPart,
  517. Parent = EffectPart,
  518. }
  519. local TextLabel = Create("TextLabel"){
  520. BackgroundTransparency = 1,
  521. Size = UDim2.new(1, 0, 1, 0),
  522. Text = Text,
  523. Font = "SciFi",
  524. TextColor3 = Color,
  525. TextScaled = true,
  526. Parent = BillboardGui,
  527. }
  528. game.Debris:AddItem(EffectPart, (Time))
  529. EffectPart.Parent = game:GetService("Workspace")
  530. delay(0, function()
  531. local Frames = (Time / Rate)
  532. for Frame = 1, Frames do
  533. wait(Rate)
  534. local Percent = (Frame / Frames)
  535. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  536. TextLabel.TextTransparency = Percent
  537. end
  538. if EffectPart and EffectPart.Parent then
  539. EffectPart:Destroy()
  540. end
  541. end)
  542. end
  543.  
  544. function MagnitudeDamage(Part, Magnitude, MinimumDamage, MaximumDamage, KnockBack, Type, HitSound, HitPitch)
  545. for _, c in pairs(workspace:children()) do
  546. local hum = c:findFirstChild("Humanoid")
  547. if hum ~= nil then
  548. local head = c:findFirstChild("Torso")
  549. if head ~= nil then
  550. local targ = head.Position - Part.Position
  551. local mag = targ.magnitude
  552. if mag <= Magnitude and c.Name ~= Player.Name then
  553. Damage(head, head, MinimumDamage, MaximumDamage, KnockBack, Type, RootPart, .1, "rbxassetid://" .. HitSound, HitPitch)
  554. end
  555. end
  556. end
  557. end
  558. end
  559.  
  560. EffectModel = Create("Model"){
  561. Parent = Character,
  562. Name = "Effects",
  563. }
  564.  
  565. Humanoid.WalkSpeed = 0
  566. Humanoid.JumpPower = 0
  567.  
  568. CFuncs['Sound'].Create("rbxassetid://836740253",Character,10,1)
  569. attack = true
  570.  
  571. New = function(Object, Parent, Name, Data)
  572. local Object = Instance.new(Object)
  573. for Index, Value in pairs(Data or {}) do
  574. Object[Index] = Value
  575. end
  576. Object.Parent = Parent
  577. Object.Name = Name
  578. return Object
  579. end
  580.  
  581. Deadly = New("Model",Torso,"Deadly",{})
  582. Sun = New("Part",Deadly,"Sun",{BrickColor = BrickColor.new("New Yeller"),Material = Enum.Material.Neon,Size = Vector3.new(0.5, 0.5, 0.5),CFrame = CFrame.new(-128.325043, 6.92500401, -88.5550079, 1, 0, 0, 0, 1, 0, 0, 0, 1),CanCollide = false,BottomSurface = Enum.SurfaceType.Smooth,TopSurface = Enum.SurfaceType.Smooth,Color = Color3.new(1, 1, 0),})
  583. SunWeld = New("Weld",Sun,"Weld",{Part0 = Sun,Part1 = Torso,C0 = CFrame.new(0,10,-10)})
  584. Mesh = New("SpecialMesh",Sun,"Mesh",{Scale = Vector3.new(25, 25, 25),MeshType = Enum.MeshType.Sphere,})
  585.  
  586.  
  587. wait(2.4)
  588. for i = 0, 5, .1 do
  589. swait()
  590. PlayAnimationFromTable({
  591. CFrame.new(0, -0, 0, 1, 0, -0, 0, 1, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  592. CFrame.new(7.62939453e-06, 1.49997127, 0, 1, 0, -0, 0, 1, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  593. CFrame.new(1.49998116, 1.30000138, -0, -0.925471961, -0.378816098, -0, 0.378816068, -0.925472021, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  594. CFrame.new(-1.49998665, -7.67409801e-07, 0, 0.996534884, 0.083175458, -0, -0.0831753537, 0.996536195, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  595. CFrame.new(0.500002444, -1.99997056, 0, 0.997888863, -0.0649460033, -0, 0.0649460033, 0.997888863, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  596. CFrame.new(-0.499981999, -1.99997056, 0, 0.998180926, 0.0602900013, -0, -0.0602900013, 0.998180926, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  597. }, .1, false)
  598. SunWeld.C0 = clerp(SunWeld.C0, CFrame.new(0,-15,-10), 0.1)
  599. end
  600. wait(0.5)
  601. Humanoid.WalkSpeed = 19
  602. Humanoid.JumpPower = 75
  603. attack = false
  604.  
  605. Effects = {
  606. Block = {
  607. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  608. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  609. prt.Anchored = true
  610. prt.CFrame = cframe
  611. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  612. game:GetService("Debris"):AddItem(prt, 10)
  613. if Type == 1 or Type == nil then
  614. table.insert(Effects, {
  615. prt,
  616. "Block1",
  617. delay,
  618. x3,
  619. y3,
  620. z3,
  621. msh
  622. })
  623. elseif Type == 2 then
  624. table.insert(Effects, {
  625. prt,
  626. "Block2",
  627. delay,
  628. x3,
  629. y3,
  630. z3,
  631. msh
  632. })
  633. end
  634. end;
  635. };
  636.  
  637. Cylinder = {
  638. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  639. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  640. prt.Anchored = true
  641. prt.CFrame = cframe
  642. local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  643. game:GetService("Debris"):AddItem(prt, 10)
  644. table.insert(Effects, {
  645. prt,
  646. "Cylinder",
  647. delay,
  648. x3,
  649. y3,
  650. z3,
  651. msh
  652. })
  653. end;
  654. };
  655. Head = {
  656. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  657. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  658. prt.Anchored = true
  659. prt.CFrame = cframe
  660. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Head", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  661. game:GetService("Debris"):AddItem(prt, 10)
  662. table.insert(Effects, {
  663. prt,
  664. "Cylinder",
  665. delay,
  666. x3,
  667. y3,
  668. z3,
  669. msh
  670. })
  671. end;
  672. };
  673.  
  674. Sphere = {
  675. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  676. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  677. prt.Anchored = true
  678. prt.CFrame = cframe
  679. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  680. game:GetService("Debris"):AddItem(prt, 10)
  681. table.insert(Effects, {
  682. prt,
  683. "Cylinder",
  684. delay,
  685. x3,
  686. y3,
  687. z3,
  688. msh
  689. })
  690. end;
  691. };
  692.  
  693. Elect = {
  694. Create = function(cff, x, y, z)
  695. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, BrickColor.new("Lime green"), "Part", Vector3.new(1, 1, 1))
  696. prt.Anchored = true
  697. prt.CFrame = cff * CFrame.new(math.random(-x, x), math.random(-y, y), math.random(-z, z))
  698. prt.CFrame = CFrame.new(prt.Position)
  699. game:GetService("Debris"):AddItem(prt, 2)
  700. local xval = math.random() / 2
  701. local yval = math.random() / 2
  702. local zval = math.random() / 2
  703. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval))
  704. table.insert(Effects, {
  705. prt,
  706. "Elec",
  707. 0.1,
  708. x,
  709. y,
  710. z,
  711. xval,
  712. yval,
  713. zval
  714. })
  715. end;
  716.  
  717. };
  718.  
  719. Ring = {
  720. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  721. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  722. prt.Anchored = true
  723. prt.CFrame = cframe
  724. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  725. game:GetService("Debris"):AddItem(prt, 10)
  726. table.insert(Effects, {
  727. prt,
  728. "Cylinder",
  729. delay,
  730. x3,
  731. y3,
  732. z3,
  733. msh
  734. })
  735. end;
  736. };
  737.  
  738.  
  739. Wave = {
  740. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  741. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  742. prt.Anchored = true
  743. prt.CFrame = cframe
  744. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  745. game:GetService("Debris"):AddItem(prt, 10)
  746. table.insert(Effects, {
  747. prt,
  748. "Cylinder",
  749. delay,
  750. x3,
  751. y3,
  752. z3,
  753. msh
  754. })
  755. end;
  756. };
  757.  
  758. Break = {
  759. Create = function(brickcolor, cframe, x1, y1, z1)
  760. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  761. prt.Anchored = true
  762. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  763. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  764. local num = math.random(10, 50) / 1000
  765. game:GetService("Debris"):AddItem(prt, 10)
  766. table.insert(Effects, {
  767. prt,
  768. "Shatter",
  769. num,
  770. prt.CFrame,
  771. math.random() - math.random(),
  772. 0,
  773. math.random(50, 100) / 100
  774. })
  775. end;
  776. };
  777.  
  778. Fire = {
  779. Create = function(brickcolor, cframe, x1, y1, z1, delay)
  780. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  781. prt.Anchored = true
  782. prt.CFrame = cframe
  783. msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  784. game:GetService("Debris"):AddItem(prt, 10)
  785. table.insert(Effects, {
  786. prt,
  787. "Fire",
  788. delay,
  789. 1,
  790. 1,
  791. 1,
  792. msh
  793. })
  794. end;
  795. };
  796.  
  797. FireWave = {
  798. Create = function(brickcolor, cframe, x1, y1, z1)
  799. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 1, brickcolor, "Effect", Vector3.new())
  800. prt.Anchored = true
  801. prt.CFrame = cframe
  802. msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  803. local d = Create("Decal"){
  804. Parent = prt,
  805. Texture = "rbxassetid://26356434",
  806. Face = "Top",
  807. }
  808. local d = Create("Decal"){
  809. Parent = prt,
  810. Texture = "rbxassetid://26356434",
  811. Face = "Bottom",
  812. }
  813. game:GetService("Debris"):AddItem(prt, 10)
  814. table.insert(Effects, {
  815. prt,
  816. "FireWave",
  817. 1,
  818. 30,
  819. math.random(400, 600) / 100,
  820. msh
  821. })
  822. end;
  823. };
  824.  
  825. Lightning = {
  826. Create = function(p0, p1, tym, ofs, col, th, tra, last)
  827. local magz = (p0 - p1).magnitude
  828. local curpos = p0
  829. local trz = {
  830. -ofs,
  831. ofs
  832. }
  833. for i = 1, tym do
  834. local li = CFuncs.Part.Create(EffectModel, "Neon", 0, tra or 0.4, col, "Ref", Vector3.new(th, th, magz / tym))
  835. local ofz = Vector3.new(trz[math.random(1, 2)], trz[math.random(1, 2)], trz[math.random(1, 2)])
  836. local trolpos = CFrame.new(curpos, p1) * CFrame.new(0, 0, magz / tym).p + ofz
  837. li.Material = "Neon"
  838. if tym == i then
  839. local magz2 = (curpos - p1).magnitude
  840. li.Size = Vector3.new(th, th, magz2)
  841. li.CFrame = CFrame.new(curpos, p1) * CFrame.new(0, 0, -magz2 / 2)
  842. table.insert(Effects, {
  843. li,
  844. "Disappear",
  845. last
  846. })
  847. else
  848. do
  849. do
  850. li.CFrame = CFrame.new(curpos, trolpos) * CFrame.new(0, 0, magz / tym / 2)
  851. curpos = li.CFrame * CFrame.new(0, 0, magz / tym / 2).p
  852. game.Debris:AddItem(li, 10)
  853. table.insert(Effects, {
  854. li,
  855. "Disappear",
  856. last
  857. })
  858. end
  859. end
  860. end
  861. end
  862. end
  863. };
  864.  
  865. EffectTemplate = {
  866.  
  867. };
  868. }
  869.  
  870. function supernova()
  871. attack = true
  872. for i = 0, 1, 0.1 do
  873. swait()
  874. PlayAnimationFromTable({
  875. CFrame.new(0, -0, 0, 1, 0, -0, 0, 1, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  876. CFrame.new(7.62939453e-06, 1.49997127, 0, 1, 0, -0, 0, 1, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  877. CFrame.new(1.49998248, 1.03999865, 1.31132779e-07, -0.874934673, -0.48424086, -8.74230253e-08, 0.48424086, -0.874934673, 2.16521015e-13, -7.64895418e-08, -4.23336139e-08, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  878. CFrame.new(-1.45997405, 1.03999221, 0, -0.85547322, 0.5178473, -0, -0.517847538, -0.855473042, 0, 0, -0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  879. CFrame.new(0.500002444, -1.99997056, 0, 0.997888863, -0.0649460033, -0, 0.0649460033, 0.997888863, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  880. CFrame.new(-0.499981999, -1.99997056, 0, 0.998180926, 0.0602900013, -0, -0.0602900013, 0.998180926, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  881. }, .3, false)
  882. end
  883. wait(.5)
  884. for i = 0, 5, .1 do
  885. Mesh.Scale = Mesh.Scale + Vector3.new(2,2,2)
  886. swait()
  887. end
  888. --
  889. coroutine.wrap(function()
  890. repeat swait()
  891. Mesh.Scale = Mesh.Scale + Vector3.new(2,2,2)
  892. until nil
  893. end)()
  894. --CFuncs['Sound'].Create("rbxassetid://265492506",Character,10,1)
  895. local a = Instance.new("ColorCorrectionEffect",game:service'Lighting')
  896. a.TintColor = Color3.new(1,1,1)
  897. local b = Instance.new("BlurEffect",game:service'Lighting')
  898. b.Size = 0
  899.  
  900. for i = 1,0,-.1 do
  901. b.Size = b.Size + .5
  902. a.TintColor = Color3.new(1,1,i)
  903. wait()
  904. end
  905. wait(1)
  906.  
  907.  
  908. for i = 1,0,-.1 do
  909. a.TintColor = Color3.new(1,i,0)
  910. b.Size = b.Size + 1
  911. wait()
  912. end
  913.  
  914. wait(1)
  915.  
  916. for i = 1,0,-.1 do
  917. a.TintColor = Color3.new(i,0,0)
  918. wait()
  919. end
  920. wait(1)
  921.  
  922. coroutine.wrap(function()
  923. for i,v in next, workspace:children() do
  924. if v:IsA"Model" or v:IsA"Part" then
  925. if v:FindFirstChildOfClass"Humanoid"then
  926. v:BreakJoints()
  927. end
  928. end
  929. end
  930. end)()
  931. wait(1)
  932.  
  933. for i = 0,1,.1 do
  934. a.TintColor = Color3.new(1,1,i)
  935. b.Size = b.Size - 2
  936. wait()
  937. end
  938.  
  939. a:destroy()
  940. game:service'Debris':AddItem(b,3)
  941. end
  942. function attackone()
  943. CFuncs['Sound'].Create("rbxassetid://811841430",Character,10,1)
  944. local a = Instance.new("Part",Character)
  945. a.Name = "Lazer"
  946. a.Anchored = true
  947. a.CanCollide = false
  948. a.BrickColor = BrickColor.new"New Yeller"
  949. local ray = Ray.new(
  950. Sun.CFrame.p, -- origin
  951. (Mouse.Hit.p - Sun.CFrame.p).unit * 500 -- direction
  952. )
  953. local ignore = Character
  954. local hit, position, normal = workspace:FindPartOnRay(ray, ignore)
  955. if hit then
  956. local humanoid = hit.Parent:FindFirstChildOfClass("Humanoid")
  957.  
  958. if not humanoid then
  959. humanoid = hit.Parent.Parent:FindFirstChildOfClass("Humanoid")
  960. end
  961. if humanoid then
  962. if humanoid.Parent:IsA"Model" then
  963. humanoid.Parent:BreakJoints()
  964. end
  965. end
  966. end
  967. a.BottomSurface = 10
  968. a.TopSurface = 10
  969. local distance = (Sun.CFrame.p - position).magnitude
  970. a.Size = Vector3.new(1, 1, distance)
  971. a.CFrame = CFrame.new(Sun.CFrame.p, position) * CFrame.new(0, 0, -distance / 2)
  972. game:GetService("Debris"):AddItem(a, 0.1)
  973. end
  974.  
  975. Mouse.Button1Down:connect(function()
  976. if attack == false and attacktype == 1 then
  977. attackone()
  978. end
  979. end)
  980.  
  981.  
  982. Mouse.KeyDown:connect(function(k)
  983. if attack == false and k == 'v' then
  984. supernova()
  985. end
  986. end)
  987. while true do
  988. swait()
  989. for i, v in pairs(Character:GetChildren()) do
  990. if v:IsA("Part") then
  991. v.Material = "SmoothPlastic"
  992. elseif v:IsA("Accessory") then
  993. v:WaitForChild("Handle").Material = "SmoothPlastic"
  994. end
  995. end
  996. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  997. velocity = RootPart.Velocity.y
  998. sine = sine + change
  999. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  1000. if RootPart.Velocity.y > 1 and hit == nil then
  1001. Anim = "Jump"
  1002. if attack == false then
  1003. PlayAnimationFromTable({
  1004. CFrame.new(0, 0, 0, 1, -2.21689355e-12, -5.11591203e-13, -2.21689355e-12, 1, 7.74860496e-07, -5.11591203e-13, 7.74860496e-07, 1.00000048) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1005. CFrame.new(-0.0579944476, 1.48445117, -0.000906195492, 0.999631822, -0.0259140469, -0.00804444961, 0.0262291897, 0.998776913, 0.0419151038, 0.0069484422, -0.0421099029, 0.999089062) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1006. CFrame.new(1.68067598, 0.167780995, 5.50026158e-08, 0.965881884, -0.258982956, -3.41060513e-13, 0.258982956, 0.965881884, 4.47034836e-07, 8.49010675e-08, 3.16640808e-07, 1.00000024) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1007. CFrame.new(-1.67620921, 0.188169807, -3.04922651e-07, 0.95698452, 0.290146649, -2.61441073e-07, -0.290146649, 0.95698452, -1.0069979e-05, -2.89639524e-06, 1.04542296e-05, 1.00000024) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1008. CFrame.new(0.537238836, -1.93797374, 0.176598221, 0.998698533, -0.0506777391, -0.00574572897, 0.0510024093, 0.992341697, 0.112511501, -6.35704041e-08, -0.112657718, 0.993634105) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1009. CFrame.new(-0.536944568, -1.94808352, 0.126473114, 0.998626292, 0.0520468242, 0.00521374354, -0.0523067154, 0.993665218, 0.0995327011, -3.84102691e-07, -0.099668026, 0.995023906) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1010. }, .3, false)
  1011. end
  1012. elseif RootPart.Velocity.y < -1 and hit == nil then
  1013. Anim = "Fall"
  1014. if attack == false then
  1015. PlayAnimationFromTable({
  1016. CFrame.new(0, 0, 0, 1, -2.21689355e-12, -5.11591203e-13, -2.21689355e-12, 1, 7.74860496e-07, -5.11591203e-13, 7.74860496e-07, 1.00000048) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1017. CFrame.new(-0.0576509275, 1.50532985, -0.129091382, 0.999631822, -0.0231846143, -0.0140984114, 0.0262298863, 0.958684564, 0.283279002, 0.00694822101, -0.283544153, 0.958935201) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1018. CFrame.new(1.68622994, 0.21415168, 7.02040666e-08, 0.881990671, -0.471266806, -3.41060513e-13, 0.471266806, 0.881990671, 4.47034836e-07, 1.54493137e-07, 2.89139166e-07, 1.00000024) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1019. CFrame.new(-1.72513735, 0.240890861, 2.54038241e-07, 0.814108491, 0.58071363, -2.61430017e-07, -0.580713034, 0.814108849, -1.00698489e-05, -6.08482924e-06, 8.98058715e-06, 1.00000024) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1020. CFrame.new(0.536720514, -1.92783141, 0.223740995, 0.998698533, -0.0498600565, -0.0107376017, 0.0510031059, 0.976314366, 0.210260883, -3.04512355e-07, -0.210534185, 0.977587521) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1021. CFrame.new(-0.535922825, -1.92850935, 0.222419083, 0.99863112, 0.0512506701, 0.0104565797, -0.0523065142, 0.978474379, 0.199629858, -3.7062793e-07, -0.199902818, 0.97981596) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1022. }, .3, false)
  1023. end
  1024. elseif Torsovelocity < 1 and hit ~= nil then
  1025. Anim = "Idle"
  1026. if attack == false then
  1027. change = 1
  1028. PlayAnimationFromTable({
  1029. CFrame.new(0, -0, 0, 1, 0, -0, 0, 1, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1030. CFrame.new(7.62939453e-06, 1.49997127, 0, 1, 0, -0, 0, 1, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(math.sin(sine/22)/12,0,0),
  1031. CFrame.new(0.429973245, 0.490001738, -0.460011989, 0.0975494087, 0.994276762, -0.0435587466, 0.0559796244, -0.0491798446, -0.997221529, -0.993656218, 0.0948399603, -0.0604567304) * CFrame.new(0, 0, math.sin(sine/16)/14) * CFrame.Angles(0, math.sin(sine/16)/10, math.sin(sine/16)/10),
  1032. CFrame.new(-0.320005357, 0.480002224, -0.539992452, 0.357028693, -0.930425704, -0.0826981664, -0.130211353, 0.0380947962, -0.990754068, 0.924973309, 0.364495993, -0.107551016) * CFrame.new(0, 0, math.sin(sine/16)/14) * CFrame.Angles(0, -math.sin(sine/16)/10, -math.sin(sine/16)/10),
  1033. CFrame.new(0.500002444, -1.99997056, 0, 0.997888863, -0.0649460033, -0, 0.0649460033, 0.997888863, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1034. CFrame.new(-0.499981999, -1.99997056, 0, 0.998180926, 0.0602900013, -0, -0.0602900013, 0.998180926, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1035. }, .3, false)
  1036.  
  1037. end
  1038. elseif Torsovelocity > 2 and hit ~= nil then
  1039. Anim = "Walk"
  1040. if attack == false then
  1041. PlayAnimationFromTable({
  1042. CFrame.new(0, 0, 0, 1, -2.21689355e-12, -5.11591203e-13, -2.21689355e-12, 1, 7.74860496e-07, -5.11591203e-13, 7.74860496e-07, 1.00000048) * CFrame.new(0, 0- .08 * math.cos((sine) / 3), 0) * CFrame.Angles(0, 0, 0),
  1043. CFrame.new(-0.0595112406, 1.55331731, -0.0425721854, 0.999631822, -0.0248252042, -0.010953242, 0.0262294486, 0.987443328, 0.155781403, 0.00694842171, -0.156010598, 0.987731278) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1044. CFrame.new(0.429973245, 0.490001738, -0.460011989, 0.0975494087, 0.994276762, -0.0435587466, 0.0559796244, -0.0491798446, -0.997221529, -0.993656218, 0.0948399603, -0.0604567304) * CFrame.new(0, 0, math.sin(sine/16)/14) * CFrame.Angles(0, math.sin(sine/16)/10, math.sin(sine/16)/10),
  1045. CFrame.new(-0.320005357, 0.480002224, -0.539992452, 0.357028693, -0.930425704, -0.0826981664, -0.130211353, 0.0380947962, -0.990754068, 0.924973309, 0.364495993, -0.107551016) * CFrame.new(0, 0, math.sin(sine/16)/14) * CFrame.Angles(0, -math.sin(sine/16)/10, -math.sin(sine/16)/10),
  1046. CFrame.new(0.540300786, -1.99793816, -9.82598067e-07, 0.998698533, -0.0510031395, 6.36324955e-07, 0.0510031395, 0.998698533, -1.00461093e-05, -8.35937328e-08, 1.08393433e-05, 1.00000024) * CFrame.new(0, 0, 0+ .5 * math.cos((sine) / 6)) * CFrame.Angles(math.rad(0 - 30 * math.cos((sine) / 6)), 0, 0),
  1047. CFrame.new(-0.539563596, -1.99794078, 1.12228372e-06, 0.998635888, 0.0523072146, -1.77852357e-07, -0.0523072146, 0.998635888, -1.00715051e-05, -3.89727461e-07, 1.08406466e-05, 1.00000024) * CFrame.new(0, 0, 0- .5 * math.cos((sine) / 6)) * CFrame.Angles(math.rad(0 + 30 * math.cos((sine) / 6)), 0, 0),
  1048. }, .3, false)
  1049. end
  1050. end
  1051. if 0 < #Effects then
  1052. for e = 1, #Effects do
  1053. if Effects[e] ~= nil then
  1054. local Thing = Effects[e]
  1055. if Thing ~= nil then
  1056. local Part = Thing[1]
  1057. local Mode = Thing[2]
  1058. local Delay = Thing[3]
  1059. local IncX = Thing[4]
  1060. local IncY = Thing[5]
  1061. local IncZ = Thing[6]
  1062. if Thing[2] == "Shoot" then
  1063. local Look = Thing[1]
  1064. local move = 30
  1065. if Thing[8] == 3 then
  1066. move = 10
  1067. end
  1068. local hit, pos = rayCast(Thing[4], Thing[1], move, m)
  1069. if Thing[10] ~= nil then
  1070. da = pos
  1071. cf2 = CFrame.new(Thing[4], Thing[10].Position)
  1072. cfa = CFrame.new(Thing[4], pos)
  1073. tehCF = cfa:lerp(cf2, 0.2)
  1074. Thing[1] = tehCF.lookVector
  1075. end
  1076. local mag = (Thing[4] - pos).magnitude
  1077. Effects["Head"].Create(Torso.BrickColor, CFrame.new((Thing[4] + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0), 1, mag * 5, 1, 0.5, 0, 0.5, 0.2)
  1078. if Thing[8] == 2 then
  1079. Effects["Ring"].Create(Torso.BrickColor, CFrame.new((Thing[4] + pos) / 2, pos) * CFrame.Angles(1.57, 0, 0) * CFrame.fromEulerAnglesXYZ(1.57, 0, 0), 1, 1, 0.1, 0.5, 0.5, 0.1, 0.1, 1)
  1080. end
  1081. Thing[4] = Thing[4] + Look * move
  1082. Thing[3] = Thing[3] - 1
  1083. if 2 < Thing[5] then
  1084. Thing[5] = Thing[5] - 0.3
  1085. Thing[6] = Thing[6] - 0.3
  1086. end
  1087. if hit ~= nil then
  1088. Thing[3] = 0
  1089. if Thing[8] == 1 or Thing[8] == 3 then
  1090. Damage(hit, hit, Thing[5], Thing[6], Thing[7], "Normal", RootPart, 0, "", 1)
  1091. else
  1092. if Thing[8] == 2 then
  1093. Damage(hit, hit, Thing[5], Thing[6], Thing[7], "Normal", RootPart, 0, "", 1)
  1094. if (hit.Parent:findFirstChild("Humanoid")) ~= nil or (hit.Parent.Parent:findFirstChild("Humanoid")) ~= nil then
  1095. ref = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
  1096. ref.Anchored = true
  1097. ref.CFrame = CFrame.new(pos)
  1098. CFuncs["Sound"].Create("161006093", ref, 1, 1.2)
  1099. game:GetService("Debris"):AddItem(ref, 0.2)
  1100. Effects["Block"].Create(Torso.BrickColor, CFrame.new(ref.Position) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 1, 10, 10, 10, 0.1, 2)
  1101. Effects["Ring"].Create(BrickColor.new("Bright yellow"), CFrame.new(ref.Position) * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)), 1, 1, 0.1, 4, 4, 0.1, 0.1)
  1102. MagnitudeDamage(ref, 15, Thing[5] / 1.5, Thing[6] / 1.5, 0, "Normal", "", 1)
  1103. end
  1104. end
  1105. end
  1106. ref = CFuncs.Part.Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
  1107. ref.Anchored = true
  1108. ref.CFrame = CFrame.new(pos)
  1109. Effects["Sphere"].Create(Torso.BrickColor, CFrame.new(pos), 5, 5, 5, 1, 1, 1, 0.07)
  1110. game:GetService("Debris"):AddItem(ref, 1)
  1111. end
  1112. if Thing[3] <= 0 then
  1113. table.remove(Effects, e)
  1114. end
  1115. end
  1116. do
  1117. do
  1118. if Thing[2] == "FireWave" then
  1119. if Thing[3] <= Thing[4] then
  1120. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(0, 1, 0)
  1121. Thing[3] = Thing[3] + 1
  1122. Thing[6].Scale = Thing[6].Scale + Vector3.new(Thing[5], 0, Thing[5])
  1123. else
  1124. Part.Parent = nil
  1125. table.remove(Effects, e)
  1126. end
  1127. end
  1128. if Thing[2] ~= "Shoot" and Thing[2] ~= "Wave" and Thing[2] ~= "FireWave" then
  1129. if Thing[1].Transparency <= 1 then
  1130. if Thing[2] == "Block1" then
  1131. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1132. Mesh = Thing[7]
  1133. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1134. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1135. else
  1136. if Thing[2] == "Block2" then
  1137. Thing[1].CFrame = Thing[1].CFrame
  1138. Mesh = Thing[7]
  1139. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1140. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1141. else
  1142. if Thing[2] == "Fire" then
  1143. Thing[1].CFrame = CFrame.new(Thing[1].Position) + Vector3.new(0, 0.2, 0)
  1144. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1145. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1146. else
  1147. if Thing[2] == "Cylinder" then
  1148. Mesh = Thing[7]
  1149. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1150. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1151. else
  1152. if Thing[2] == "Blood" then
  1153. Mesh = Thing[7]
  1154. Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 0.5, 0)
  1155. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1156. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1157. else
  1158. if Thing[2] == "Elec" then
  1159. Mesh = Thing[10]
  1160. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1161. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1162. else
  1163. if Thing[2] == "Disappear" then
  1164. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1165. else
  1166. if Thing[2] == "Shatter" then
  1167. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1168. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  1169. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  1170. Thing[6] = Thing[6] + Thing[5]
  1171. end
  1172. end
  1173. end
  1174. end
  1175. end
  1176. end
  1177. end
  1178. end
  1179. else
  1180. Part.Parent = nil
  1181. table.remove(Effects, e)
  1182. end
  1183. end
  1184. end
  1185. end
  1186. end
  1187. end
  1188. end
  1189. end
  1190. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement