Advertisement
shgsiughiiruhdu12354

The sun is a deadly Lazer

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