Advertisement
samuelrichter66

because the previous sun broke

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