Advertisement
RobloxScriptzzz

Sun Death roblox script

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