Advertisement
kqdragon

op gun

May 2nd, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --=Bird wings made by Lyokofan2000
  2. --Jump Two Time
  3. --Down Press Q
  4. --Wings Spin Press A Two Time
  5. --Wings Spin Press D Two Time
  6.  
  7. script.Parent = nil
  8.  
  9. function fly()
  10.  
  11. for i,v in pairs(script:GetChildren()) do
  12.  
  13. pcall(function() v.Value = "" end)
  14.  
  15. game:GetService("Debris"):AddItem(v,.1)
  16.  
  17. end
  18.  
  19. function weld(p0,p1,c0,c1,par)
  20.  
  21. local w = Instance.new("Weld",p0 or par)
  22.  
  23. w.Part0 = p0
  24.  
  25. w.Part1 = p1
  26.  
  27. w.C0 = c0 or CFrame.new()
  28.  
  29. w.C1 = c1 or CFrame.new()
  30.  
  31. return w
  32.  
  33. end
  34.  
  35. local motors = {}
  36.  
  37. function motor(p0,p1,c0,c1,des,vel,par)
  38.  
  39. local w = Instance.new("Motor6D",p0 or par)
  40.  
  41. w.Part0 = p0
  42.  
  43. w.Part1 = p1
  44.  
  45. w.C0 = c0 or CFrame.new()
  46.  
  47. w.C1 = c1 or CFrame.new()
  48.  
  49. w.MaxVelocity = tonumber(vel) or .05
  50.  
  51. w.DesiredAngle = tonumber(des) or 0
  52.  
  53. return w
  54.  
  55. end
  56.  
  57. function lerp(a,b,c)
  58.  
  59. return a+(b-a)*c
  60.  
  61. end
  62.  
  63. function clerp(c1,c2,al)
  64.  
  65. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  66.  
  67. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  68.  
  69. for i,v in pairs(com1) do
  70.  
  71. com1[i] = lerp(v,com2[i],al)
  72.  
  73. end
  74.  
  75. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  76.  
  77. end
  78.  
  79. function ccomplerp(c1,c2,al)
  80.  
  81. local com1 = {c1:components()}
  82.  
  83. local com2 = {c2:components()}
  84.  
  85. for i,v in pairs(com1) do
  86.  
  87. com1[i] = lerp(v,com2[i],al)
  88.  
  89. end
  90.  
  91. return CFrame.new(unpack(com1))
  92.  
  93. end
  94.  
  95. function tickwave(time,length,offset)
  96.  
  97. return (math.abs((tick()+(offset or 0))%time-time/2)*2-time/2)/time/2*length
  98.  
  99. end
  100.  
  101. function invcol(c)
  102.  
  103. c = c.Color
  104.  
  105. return BrickColor.new(Color3.new(1-c.b,1-c.g,1-c.r))
  106.  
  107. end
  108.  
  109. local oc = oc or function(...) return ... end
  110.  
  111. local plr = game.Players.LocalPlayer
  112.  
  113. local char = plr.Character
  114.  
  115. local tor = char.Torso
  116.  
  117. local hum = char.Humanoid
  118.  
  119. hum.PlatformStand = false
  120.  
  121. pcall(function()
  122.  
  123. char.Wings:Destroy()
  124.  
  125. end)
  126.  
  127. pcall(function()
  128.  
  129. char.Angel:Destroy() -- hat
  130.  
  131. end)
  132.  
  133. local mod = Instance.new("Model",char)
  134.  
  135. mod.Name = "Wings"
  136.  
  137. local special = {
  138.  
  139. --antiboomz0r = {"Really black","Institutional white",0,0,false,Color3.new(1,1,.95),Color3.new(1,1,.6)},
  140.  
  141. antiboomz0r = {"New Yeller",nil,0.4,0.7,true,Color3.new(1,1,.95),Color3.new(1,1,.6)},
  142.  
  143. --antiboomz0r = {"Cyan","Toothpaste",0,0,false,Color3.new(1,0,0),Color3.new(0,0,0)},
  144.  
  145. taart = {"Royal purple",nil,.4,.4,true},
  146.  
  147. mitta = {"Black",nil,0,0,false},
  148.  
  149. penjuin3 = {"White",nil,0,0,false},
  150.  
  151. thepc8110 = {"Black","Bright red",.5,0,false,Color3.new(1,0,0),Color3.new(0,0,0)},
  152.  
  153. nonspeaker = {"Cyan","Toothpaste",0,0,false,Color3.new(1,0,0),Color3.new(0,0,0)},
  154.  
  155. littleau999 = {"Reddish brown",1030,0,0,false},
  156.  
  157. unscripter = {"Really black","Really black",.2,0,true,Color3.new(0,0,0),Color3.new(0,0,0)},
  158.  
  159. oxcool1 = {"Really black","White",.2,0,false,Color3.new(0,0,0),Color3.new(0,0,0)},
  160.  
  161. krodmiss = {"Really black",nil,0,0,false},
  162.  
  163. }
  164.  
  165. local topcolor = invcol(char.Torso.BrickColor)
  166.  
  167. local feacolor = char.Torso.BrickColor
  168.  
  169. local ptrans = 0
  170.  
  171. local pref = 0
  172.  
  173. local fire = false
  174.  
  175. local fmcol = Color3.new()
  176.  
  177. local fscol = Color3.new()
  178.  
  179. local spec = special[plr.Name:lower()]
  180.  
  181. if spec then
  182.  
  183. topcolor,feacolor,ptrans,pref,fire,fmcol,fscol = spec[1] and BrickColor.new(spec[1]) or topcolor,spec[2] and BrickColor.new(spec[2]) or feacolor,spec[3],spec[4],spec[5],spec[6],spec[7]
  184.  
  185. end
  186.  
  187. local part = Instance.new("Part")
  188.  
  189. part.FormFactor = "Custom"
  190.  
  191. part.Size = Vector3.new(.2,.2,.2)
  192.  
  193. part.TopSurface,part.BottomSurface = 0,0
  194.  
  195. part.CanCollide = false
  196.  
  197. part.BrickColor = topcolor
  198.  
  199. part.Transparency = ptrans
  200.  
  201. part.Reflectance = pref
  202.  
  203. local ef = Instance.new("Fire",fire and part or nil)
  204.  
  205. ef.Size = .15
  206.  
  207. ef.Color = fmcol or Color3.new()
  208.  
  209. ef.SecondaryColor = fscol or Color3.new()
  210.  
  211. part:BreakJoints()
  212.  
  213.  
  214. function newpart()
  215.  
  216. local clone = part:Clone()
  217.  
  218. clone.Parent = mod
  219.  
  220. clone:BreakJoints()
  221.  
  222. return clone
  223.  
  224. end
  225.  
  226. local feath = newpart()
  227.  
  228. feath.BrickColor = feacolor
  229.  
  230. feath.Transparency = 0
  231.  
  232. Instance.new("SpecialMesh",feath).MeshType = "Sphere"
  233.  
  234. function newfeather()
  235.  
  236. local clone = feath:Clone()
  237.  
  238. clone.Parent = mod
  239.  
  240. clone:BreakJoints()
  241.  
  242. return clone
  243.  
  244. end
  245.  
  246.  
  247. ---------- RIGHT WING
  248.  
  249. local r1 = newpart()
  250.  
  251. r1.Size = Vector3.new(.3,1.5,.3)*1.2
  252.  
  253. local rm1 = motor(tor,r1,CFrame.new(.35,.6,.4) * CFrame.Angles(0,0,math.rad(-60)) * CFrame.Angles(math.rad(30),math.rad(-25),0),CFrame.new(0,-.8,0),.1)
  254.  
  255. local r2 = newpart()
  256.  
  257. r2.Size = Vector3.new(.4,1.8,.4)*1.2
  258.  
  259. local rm2 = motor(r1,r2,CFrame.new(0,.75,0) * CFrame.Angles(0,0,math.rad(50)) * CFrame.Angles(math.rad(-30),math.rad(15),0),CFrame.new(0,-.9,0),.1)
  260.  
  261. local r3 = newpart()
  262.  
  263. r3.Size = Vector3.new(.3,2.2,.3)*1.2
  264.  
  265. local rm3 = motor(r2,r3,CFrame.new(.1,.9,0) * CFrame.Angles(0,0,math.rad(-140)) * CFrame.Angles(math.rad(-3),0,0),CFrame.new(0,-1.1,0),.1)
  266.  
  267. local r4 = newpart()
  268.  
  269. r4.Size = Vector3.new(.25,1.2,.25)*1.2
  270.  
  271. local rm4 = motor(r3,r4,CFrame.new(0,1.1,0) * CFrame.Angles(0,0,math.rad(-10)) * CFrame.Angles(math.rad(-3),0,0),CFrame.new(0,-.6,0),.1)
  272.  
  273. local feather = newfeather()
  274.  
  275. feather.Mesh.Scale = Vector3.new(1,1,1)
  276.  
  277. feather.Size = Vector3.new(.4,3,.3)
  278.  
  279. weld(r4,feather,CFrame.new(-.1,-.3,0),CFrame.new(0,-1.5,0))
  280.  
  281. feather = newfeather()
  282.  
  283. feather.Mesh.Scale = Vector3.new(1,1,1)
  284.  
  285. feather.Size = Vector3.new(.4,2.3,.3)
  286.  
  287. weld(r4,feather,CFrame.new(.1,-.1,0) * CFrame.Angles(0,math.random()*.1,0),CFrame.new(0,-1.1,0))
  288.  
  289. feather = newfeather()
  290.  
  291. feather.Mesh.Scale = Vector3.new(1,1,1)
  292.  
  293. feather.Size = Vector3.new(.35,2.2,.25)
  294.  
  295. weld(r4,feather,CFrame.new(.1,-.3,0) * CFrame.Angles(0,math.random()*.1,math.rad(-10)),CFrame.new(0,-1.1,0))
  296.  
  297. local rf3 = {}
  298.  
  299. for i=0,7 do
  300.  
  301. feather = newfeather()
  302.  
  303. feather.Mesh.Scale = Vector3.new(1,1,1)
  304.  
  305. feather.Size = Vector3.new(.45,2.2,.35)
  306.  
  307. table.insert(rf3,motor(r3,feather,CFrame.new(.05,1-i*.285,0) * CFrame.Angles(0,math.random()*.1,math.rad(-25-i*2)),CFrame.new(0,-feather.Size.Y/2,0)))
  308.  
  309. end
  310.  
  311. local rf2 = {}
  312.  
  313. for i=0,6 do
  314.  
  315. feather = newfeather()
  316.  
  317. feather.Mesh.Scale = Vector3.new(1,1,1)
  318.  
  319. feather.Size = Vector3.new(.45,2.2-i*.08,.3)
  320.  
  321. table.insert(rf2,motor(r2,feather,CFrame.new(.05,.75-i*.26,0) * CFrame.Angles(0,math.random()*.1,math.rad(-75-i*4)),CFrame.new(0,-feather.Size.Y/2,0)))
  322.  
  323. end
  324.  
  325. local rf1 = {}
  326.  
  327. for i=0,6 do
  328.  
  329. feather = newfeather()
  330.  
  331. feather.Mesh.Scale = Vector3.new(1,1,1)
  332.  
  333. feather.Size = Vector3.new(.37,1.65-i*.06,.25)
  334.  
  335. table.insert(rf1,motor(r1,feather,CFrame.new(.05,.63-i*.21,0) * CFrame.Angles(0,math.random()*.05,math.rad(-75)),CFrame.new(0,-feather.Size.Y/2,0)))
  336.  
  337. end
  338.  
  339. ---------- LEFT WING
  340.  
  341. local l1 = newpart()
  342.  
  343. l1.Size = Vector3.new(.3,1.5,.3)*1.2
  344.  
  345. local lm1 = motor(tor,l1,CFrame.new(-.35,.6,.4) * CFrame.Angles(0,0,math.rad(60)) * CFrame.Angles(math.rad(30),math.rad(25),0) * CFrame.Angles(0,-math.pi,0),CFrame.new(0,-.8,0) ,.1)
  346.  
  347. local l2 = newpart()
  348.  
  349. l2.Size = Vector3.new(.4,1.8,.4)*1.2
  350.  
  351. local lm2 = motor(l1,l2,CFrame.new(0,.75,0) * CFrame.Angles(0,0,math.rad(50)) * CFrame.Angles(math.rad(30),math.rad(-15),0),CFrame.new(0,-.9,0),.1)
  352.  
  353. local l3 = newpart()
  354.  
  355. l3.Size = Vector3.new(.3,2.2,.3)*1.2
  356.  
  357. local lm3 = motor(l2,l3,CFrame.new(.1,.9,0) * CFrame.Angles(0,0,math.rad(-140)) * CFrame.Angles(math.rad(3),0,0),CFrame.new(0,-1.1,0),.1)
  358.  
  359. local l4 = newpart()
  360.  
  361. l4.Size = Vector3.new(.25,1.2,.25)*1.2
  362.  
  363. local lm4 = motor(l3,l4,CFrame.new(0,1.1,0) * CFrame.Angles(0,0,math.rad(-10)) * CFrame.Angles(math.rad(3),0,0),CFrame.new(0,-.6,0),.1)
  364.  
  365. local feather = newfeather()
  366.  
  367. feather.Mesh.Scale = Vector3.new(1,1,1)
  368.  
  369. feather.Size = Vector3.new(.4,3,.3)
  370.  
  371. weld(l4,feather,CFrame.new(-.1,-.3,0),CFrame.new(0,-1.5,0))
  372.  
  373. feather = newfeather()
  374.  
  375. feather.Mesh.Scale = Vector3.new(1,1,1)
  376.  
  377. feather.Size = Vector3.new(.4,2.3,.3)
  378.  
  379. weld(l4,feather,CFrame.new(.1,-.1,0) * CFrame.Angles(0,math.random()*.1,0),CFrame.new(0,-1.1,0))
  380.  
  381. feather = newfeather()
  382.  
  383. feather.Mesh.Scale = Vector3.new(1,1,1)
  384.  
  385. feather.Size = Vector3.new(.35,2.2,.25)
  386.  
  387. weld(l4,feather,CFrame.new(.1,-.3,0) * CFrame.Angles(0,math.random()*.1,math.rad(-10)),CFrame.new(0,-1.1,0))
  388.  
  389. local lf3 = {}
  390.  
  391. for i=0,7 do
  392.  
  393. feather = newfeather()
  394.  
  395. feather.Mesh.Scale = Vector3.new(1,1,1)
  396.  
  397. feather.Size = Vector3.new(.45,2.2,.35)
  398.  
  399. table.insert(lf3,motor(l3,feather,CFrame.new(.05,1-i*.285,0) * CFrame.Angles(0,math.random()*.1,math.rad(-25-i*2)),CFrame.new(0,-feather.Size.Y/2,0)))
  400.  
  401. end
  402.  
  403. local lf2 = {}
  404.  
  405. for i=0,6 do
  406.  
  407. feather = newfeather()
  408.  
  409. feather.Mesh.Scale = Vector3.new(1,1,1)
  410.  
  411. feather.Size = Vector3.new(.45,2.2-i*.08,.3)
  412.  
  413. table.insert(lf2,motor(l2,feather,CFrame.new(.05,.75-i*.26,0) * CFrame.Angles(0,math.random()*.1,math.rad(-75-i*4)),CFrame.new(0,-feather.Size.Y/2,0)))
  414.  
  415. end
  416.  
  417. local lf1 = {}
  418.  
  419. for i=0,6 do
  420.  
  421. feather = newfeather()
  422.  
  423. feather.Mesh.Scale = Vector3.new(1,1,1)
  424.  
  425. feather.Size = Vector3.new(.37,1.65-i*.06,.25)
  426.  
  427. table.insert(lf1,motor(l1,feather,CFrame.new(.05,.63-i*.21,0) * CFrame.Angles(0,math.random()*.05,math.rad(-75)),CFrame.new(0,-feather.Size.Y/2,0)))
  428.  
  429. end
  430.  
  431. local rwing = {rm1,rm2,rm3,rm4}
  432.  
  433. local lwing = {lm1,lm2,lm3,lm4}
  434.  
  435. local oc0 = {}
  436.  
  437. for i,v in pairs(rwing) do
  438.  
  439. oc0[v] = v.C0
  440.  
  441. end
  442.  
  443. for i,v in pairs(lwing) do
  444.  
  445. oc0[v] = v.C0
  446.  
  447. end
  448.  
  449. function gotResized()
  450.  
  451. if lastsize then
  452.  
  453. if tor.Size == lastsize then return end -- This shouldn't happen?
  454.  
  455. local scaleVec = tor.Size/lastsize
  456.  
  457. for i,v in pairs(oc0) do
  458.  
  459. oc0[i] = v-v.p+scaleVec*v.p
  460.  
  461. end
  462.  
  463. lastsize = tor.Size
  464.  
  465. end
  466.  
  467. lastsize = tor.Size
  468.  
  469. end
  470.  
  471. tor.Changed:connect(function(p)
  472.  
  473. if p == "Size" then
  474.  
  475. gotResized()
  476.  
  477. end
  478.  
  479. end)
  480.  
  481. gotResized()
  482.  
  483. local idle = {0,0.5,-.2,0; .05,.05,.1,.05; -.6,-1.5,.1,0;}--0,.3,0,0
  484.  
  485. local outlow = {-.7,-.2,1.8,0; .3,.05,.1,.05; .2,0,0,0}
  486.  
  487. local outhigh = {.5,-.2,1.8,0; .3,.05,.1,.05; .2,0,0,0}
  488.  
  489. local veryhigh = {.9,-.3,1.9,0; .3,.05,.1,.05; .2,0,0,0}
  490.  
  491. local flap1 = {-.3,.3,1.1,-.2; .3,.05,.1,.05; .2,-.6,0,0}
  492.  
  493. local divebomb = {0,.2,.4,-.7; .3,.05,.1,.05; 0,-.5,-.6,0}
  494.  
  495.  
  496. function setwings(tab,time)
  497.  
  498. time = time or 10
  499.  
  500. for i=1,4 do
  501.  
  502. rwing[i].DesiredAngle = tab[i]
  503.  
  504. lwing[i].DesiredAngle = tab[i]
  505.  
  506. rwing[i].MaxVelocity = math.abs(tab[i]-rwing[i].CurrentAngle)/time
  507.  
  508. lwing[i].MaxVelocity = math.abs(tab[i]-lwing[i].CurrentAngle)/time
  509.  
  510. local rcf = oc0[rwing[i]] * (tab[12+i] or CFrame.new())
  511.  
  512. local lcf = oc0[lwing[i]] * (tab[12+i] or CFrame.new())
  513.  
  514. end
  515.  
  516. for i,v in pairs(rf1) do
  517.  
  518. v.DesiredAngle = tab[9]
  519.  
  520. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  521.  
  522. end
  523.  
  524. for i,v in pairs(lf1) do
  525.  
  526. v.DesiredAngle = tab[9]
  527.  
  528. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  529.  
  530. end
  531.  
  532. for i,v in pairs(rf2) do
  533.  
  534. v.DesiredAngle = tab[10]
  535.  
  536. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  537.  
  538. end
  539.  
  540. for i,v in pairs(lf2) do
  541.  
  542. v.DesiredAngle = tab[10]
  543.  
  544. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  545.  
  546. end
  547.  
  548. for i,v in pairs(rf3) do
  549.  
  550. v.DesiredAngle = tab[11]
  551.  
  552. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  553.  
  554. end
  555.  
  556. for i,v in pairs(lf3) do
  557.  
  558. v.DesiredAngle = tab[11]
  559.  
  560. v.MaxVelocity = math.abs(v.DesiredAngle-v.CurrentAngle)/time
  561.  
  562. end
  563.  
  564. end
  565.  
  566. setwings(outhigh,1)
  567.  
  568. flying = false
  569.  
  570. moving = false
  571.  
  572. for i,v in pairs(tor:GetChildren()) do
  573.  
  574. if v.ClassName:lower():match("body") then
  575.  
  576. v:Destroy()
  577.  
  578. end
  579.  
  580. end
  581.  
  582. local ctor = tor:Clone()
  583.  
  584. ctor:ClearAllChildren()
  585.  
  586. ctor.Name = "cTorso"
  587.  
  588. ctor.Transparency = 1
  589.  
  590. ctor.CanCollide = false
  591.  
  592. ctor.FormFactor = "Custom"
  593.  
  594. ctor.Size = Vector3.new(.2,.2,.2)
  595.  
  596. ctor.Parent = mod
  597.  
  598. weld(tor,ctor)
  599.  
  600. local bg = Instance.new("BodyGyro",ctor)
  601.  
  602. bg.maxTorque = Vector3.new()
  603.  
  604. bg.P = 15000
  605.  
  606. bg.D = 1000
  607.  
  608. local bv = Instance.new("BodyVelocity",ctor)
  609.  
  610. bv.maxForce = Vector3.new()
  611.  
  612. bv.P = 15000
  613.  
  614. vel = Vector3.new()
  615.  
  616. cf = CFrame.new()
  617.  
  618. flspd = 0
  619.  
  620.  
  621. keysdown = {}
  622.  
  623. keypressed = {}
  624.  
  625. ktime = {}
  626.  
  627. descendtimer = 0
  628.  
  629. jumptime = tick()
  630.  
  631. hum.Jumping:connect(function()
  632.  
  633. jumptime = tick()
  634.  
  635. end)
  636.  
  637. cam = workspace.CurrentCamera
  638.  
  639. kd = plr:GetMouse().KeyDown:connect(oc(function(key)
  640.  
  641. keysdown[key] = true
  642.  
  643. keypressed[key] = true
  644.  
  645. if key == "q" then
  646.  
  647. descendtimer = tick()
  648.  
  649. elseif key == " " and not hum.Jump then
  650.  
  651. jumptime = tick()
  652.  
  653. elseif (key == "a" or key == "d") and ktime[key] and tick()-ktime[key] < .3 and math.abs(reqrotx) < .3 then
  654.  
  655. reqrotx = key == "a" and math.pi*2 or -math.pi*2
  656.  
  657. end
  658.  
  659. ktime[key] = tick()
  660.  
  661. end))
  662.  
  663. ku = plr:GetMouse().KeyUp:connect(function(key)
  664.  
  665. keysdown[key] = false
  666.  
  667. if key == " " then
  668.  
  669. descendtimer = tick()
  670.  
  671. end
  672.  
  673. end)
  674.  
  675. function mid(a,b,c)
  676.  
  677. return math.max(a,math.min(b,c or -a))
  678.  
  679. end
  680.  
  681. function bn(a)
  682.  
  683. return a and 1 or 0
  684.  
  685. end
  686.  
  687. function gm(tar)
  688.  
  689. local m = 0
  690.  
  691. for i,v in pairs(tar:GetChildren()) do
  692.  
  693. if v:IsA("BasePart") then
  694.  
  695. m = m + v:GetMass()
  696.  
  697. end
  698.  
  699. m = m + gm(v)
  700.  
  701. end
  702.  
  703. return m
  704.  
  705. end
  706.  
  707. reqrotx = 0
  708.  
  709. local grav = 196.2
  710.  
  711. local con
  712.  
  713. con = game:GetService("RunService").Stepped:connect(oc(function()
  714.  
  715. --[[if not mod:IsDescendantOf(workspace) then
  716.  
  717. pcall(function() kd:disconnect() end)
  718.  
  719. pcall(function() ku:disconnect() end)
  720.  
  721. bg:Destroy()
  722.  
  723. bv:Destroy()
  724.  
  725. con:disconnect()
  726.  
  727. script:Destroy()
  728.  
  729. return
  730.  
  731. end]]
  732.  
  733. local obvel = tor.CFrame:vectorToObjectSpace(tor.Velocity)
  734.  
  735. local sspd, uspd,fspd = obvel.X,obvel.Y,obvel.Z
  736.  
  737. if flying then
  738.  
  739. local lfldir = fldir
  740.  
  741. fldir = cam.CoordinateFrame:vectorToWorldSpace(Vector3.new(bn(keysdown.d)-bn(keysdown.a),0,bn(keysdown.s)-bn(keysdown.w))).unit
  742.  
  743. local lmoving = moving
  744.  
  745. moving = fldir.magnitude > .1
  746.  
  747. if lmoving and not moving then
  748.  
  749. idledir = lfldir*Vector3.new(1,0,1)
  750.  
  751. descendtimer = tick()
  752.  
  753. end
  754.  
  755. local dbomb = fldir.Y < -.6 or (moving and keysdown["1"])
  756.  
  757. if moving and keysdown["0"] and lmoving then
  758.  
  759. fldir = (Vector3.new(lfldir.X,math.min(fldir.Y,lfldir.Y+.01)-.1,lfldir.Z)+(fldir*Vector3.new(1,0,1))*.05).unit
  760.  
  761. end
  762.  
  763. local down = tor.CFrame:vectorToWorldSpace(Vector3.new(0,-1,0))
  764.  
  765. local descending = (not moving and keysdown["q"] and not keysdown[" "])
  766.  
  767. cf = ccomplerp(cf,CFrame.new(tor.Position,tor.Position+(not moving and idledir or fldir)),keysdown["0"] and .02 or .07)
  768.  
  769. local gdown = not dbomb and cf.lookVector.Y < -.2 and tor.Velocity.unit.Y < .05
  770.  
  771. hum.PlatformStand = true
  772.  
  773. bg.maxTorque = Vector3.new(1,1,1)*9e5
  774.  
  775. local rotvel = CFrame.new(Vector3.new(),tor.Velocity):toObjectSpace(CFrame.new(Vector3.new(),fldir)).lookVector
  776.  
  777. bg.cframe = cf * CFrame.Angles(not moving and -.1 or -math.pi/2+.2,moving and mid(-2.5,rotvel.X/1.5) + reqrotx or 0,0)
  778.  
  779. reqrotx = reqrotx - reqrotx/10
  780.  
  781. bv.maxForce = Vector3.new(1,1,1)*9e4*.5
  782.  
  783. local anioff =(bn(keysdown[" "])-bn(keysdown["q"]))/2
  784.  
  785. local ani = tickwave(1.5-anioff,1)
  786.  
  787. bv.velocity = bv.velocity:Lerp(Vector3.new(0,bn(not moving)*-ani*15+(descending and math.min(20,tick()-descendtimer)*-8 or bn(keysdown[" "])-bn(keysdown["q"]))*15,0)+vel,.6)
  788.  
  789. vel = moving and cf.lookVector*flspd or Vector3.new()
  790.  
  791. flspd = math.min(120,lerp(flspd,moving and (fldir.Y<0 and flspd+(-fldir.Y)*grav/60 or math.max(50,flspd-fldir.Y*grav/300)) or 60,.4))
  792.  
  793. setwings(moving and (gdown and outlow or dbomb and divebomb) or (descending and veryhigh or flap1),15)
  794.  
  795. for i=1,4 do
  796.  
  797. --CFrame.Angles(-.5+bn(i==3)*2.4+bn(i==4)*.5,.1+bn(i==2)*.5-bn(i==3)*1.1,bn(i==3)*.1)
  798.  
  799. rwing[i].C0 = clerp(rwing[i].C0,oc0[rwing[i]] * (gdown and CFrame.new() or dbomb and CFrame.Angles(-.5+bn(i==3)*.4+bn(i==4)*.5,.1+bn(i==2)*.5-bn(i==3)*1.1,bn(i==3)*.1) or descending and CFrame.Angles(.3,0,0) or CFrame.Angles((i*.1+1.5)*ani,ani*-.5,1*ani)),descending and .8 or .2)
  800.  
  801. lwing[i].C0 = clerp(lwing[i].C0,oc0[lwing[i]] * (gdown and CFrame.new() or dbomb and CFrame.Angles(-(-.5+bn(i==3)*.4+bn(i==4)*.5),-(.1+bn(i==2)*.5-bn(i==3)*1.1),bn(i==3)*.1) or descending and CFrame.Angles(-.3,0,0) or CFrame.Angles(-(i*.1+1.5)*ani,ani*.5,1*ani)),descending and .8 or .2)
  802.  
  803. end
  804.  
  805. local hit,ray = workspace:FindPartOnRayWithIgnoreList(Ray.new(tor.Position,Vector3.new(0,-3.5+math.min(0,bv.velocity.y)/30,0)),{char})
  806.  
  807. if hit and down.Y < -.85 and tick()-flystart > 1 then
  808.  
  809. flying = false
  810.  
  811. hum.PlatformStand = false
  812.  
  813. tor.Velocity = Vector3.new()
  814.  
  815. end
  816.  
  817. else
  818.  
  819. bg.maxTorque = Vector3.new()
  820.  
  821. bv.maxForce = Vector3.new()
  822.  
  823. local ani = tickwave(walking and .8 or 4.5,1)
  824.  
  825. setwings(idle,10)
  826.  
  827. local x,y,z = fspd/160,uspd/700,sspd/900
  828.  
  829. for i=1,4 do
  830.  
  831. rwing[i].C0 = clerp(rwing[i].C0,oc0[rwing[i]] * CFrame.Angles(ani*.1 + -mid(-.1,x),0 + -mid(-.1,y) + bn(i==2)*.6,ani*.02 + -mid(-.1,z)),.2)
  832.  
  833. lwing[i].C0 = clerp(lwing[i].C0,oc0[lwing[i]] * CFrame.Angles(ani*-.05 + mid(-.1,x),0 + mid(-.1,y) + -bn(i==2)*.6,ani*.02 + mid(-.1,z)),.2)
  834.  
  835. end
  836.  
  837. if keypressed[" "] and not flying and (tick()-jumptime > .05 and (tick()-jumptime < 3 or hum.Jump)) then
  838.  
  839. vel = Vector3.new(0,50,0)
  840.  
  841. bv.velocity = vel
  842.  
  843. idledir = cam.CoordinateFrame.lookVector*Vector3.new(1,0,1)
  844.  
  845. cf = tor.CFrame * CFrame.Angles(-.01,0,0)
  846.  
  847. tor.CFrame = cf
  848.  
  849. bg.cframe = cf
  850.  
  851. flystart = tick()
  852.  
  853. flying = true
  854.  
  855. end
  856.  
  857. end
  858.  
  859. keypressed = {}
  860.  
  861. end))
  862.  
  863.  
  864.  
  865. end fly()
  866.  
  867. --Bird Wings By Lyokofan2000
  868. --[[Nocturna_A._Alteriano_Night.Owl.Inc]]--
  869. wait(1 / 60)
  870. Effects = { }
  871. local Player = game.Players.localPlayer
  872. local Character = Player.Character
  873. local Humanoid = Character.Humanoid
  874. local mouse = Player:GetMouse()
  875. local m = Instance.new('Model', Character)
  876. m.Name = "WeaponModel"
  877. local LeftArm = Character["Left Arm"]
  878. local RightArm = Character["Right Arm"]
  879. local LeftLeg = Character["Left Leg"]
  880. local RightLeg = Character["Right Leg"]
  881. local Head = Character.Head
  882. local Torso = Character.Torso
  883. local cam = game.Workspace.CurrentCamera
  884. local RootPart = Character.HumanoidRootPart
  885. local RootJoint = RootPart.RootJoint
  886. local equipped = false
  887. local attack = false
  888. local Anim = 'Idle'
  889. local idle = 0
  890. local attacktype = 1
  891. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  892. local velocity = RootPart.Velocity.y
  893. local sine = 0
  894. local change = 1
  895. local grabbed = false
  896. local cn = CFrame.new
  897. local mr = math.rad
  898. local angles = CFrame.Angles
  899. local ud = UDim2.new
  900. local c3 = Color3.new
  901.  
  902. Humanoid.Animator.Parent = nil
  903. Character.Animate.Parent = nil
  904.  
  905. local newMotor = function(part0, part1, c0, c1)
  906. local w = Instance.new('Motor', part0)
  907. w.Part0 = part0
  908. w.Part1 = part1
  909. w.C0 = c0
  910. w.C1 = c1
  911. return w
  912. end
  913.  
  914. function clerp(a, b, t)
  915. return a:lerp(b, t)
  916. end
  917.  
  918. RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  919. NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  920.  
  921. local RW = newMotor(Torso, RightArm, CFrame.new(1.5, 0, 0), CFrame.new(0, 0, 0))
  922. local LW = newMotor(Torso, LeftArm, CFrame.new(-1.5, 0, 0), CFrame.new(0, 0, 0))
  923. local RH = newMotor(Torso, RightLeg, CFrame.new(.5, -2, 0), CFrame.new(0, 0, 0))
  924. local LH = newMotor(Torso, LeftLeg, CFrame.new(-.5, -2, 0), CFrame.new(0, 0, 0))
  925. RootJoint.C1 = CFrame.new(0, 0, 0)
  926. RootJoint.C0 = CFrame.new(0, 0, 0)
  927. Torso.Neck.C1 = CFrame.new(0, 0, 0)
  928. Torso.Neck.C0 = CFrame.new(0, 1.5, 0)
  929.  
  930. local rarmc1 = RW.C1
  931. local larmc1 = LW.C1
  932. local rlegc1 = RH.C1
  933. local llegc1 = LH.C1
  934.  
  935. local resetc1 = false
  936.  
  937. function PlayAnimationFromTable(table, speed, bool)
  938. RootJoint.C0 = clerp(RootJoint.C0, table[1], speed)
  939. Torso.Neck.C0 = clerp(Torso.Neck.C0, table[2], speed)
  940. RW.C0 = clerp(RW.C0, table[3], speed)
  941. LW.C0 = clerp(LW.C0, table[4], speed)
  942. RH.C0 = clerp(RH.C0, table[5], speed)
  943. LH.C0 = clerp(LH.C0, table[6], speed)
  944. if bool == true then
  945. if resetc1 == false then
  946. resetc1 = true
  947. RootJoint.C1 = RootJoint.C1
  948. Torso.Neck.C1 = Torso.Neck.C1
  949. RW.C1 = rarmc1
  950. LW.C1 = larmc1
  951. RH.C1 = rlegc1
  952. LH.C1 = llegc1
  953. end
  954. end
  955. end
  956.  
  957. --[[Credits to SazErenos for his Artificial Heartbeat]]--
  958.  
  959. ArtificialHB = Instance.new("BindableEvent", script)
  960. ArtificialHB.Name = "Heartbeat"
  961.  
  962. script:WaitForChild("Heartbeat")
  963.  
  964. frame = 1 / 30
  965. tf = 0
  966. allowframeloss = false
  967. tossremainder = false
  968. lastframe = tick()
  969. script.Heartbeat:Fire()
  970.  
  971. game:GetService("RunService").Heartbeat:connect(function(s, p)
  972. tf = tf + s
  973. if tf >= frame then
  974. if allowframeloss then
  975. script.Heartbeat:Fire()
  976. lastframe = tick()
  977. else
  978. for i = 1, math.floor(tf / frame) do
  979. script.Heartbeat:Fire()
  980. end
  981. lastframe = tick()
  982. end
  983. if tossremainder then
  984. tf = 0
  985. else
  986. tf = tf - frame * math.floor(tf / frame)
  987. end
  988. end
  989. end)
  990.  
  991. function swait(num)
  992. if num == 0 or num == nil then
  993. ArtificialHB.Event:wait()
  994. else
  995. for i = 0, num do
  996. ArtificialHB.Event:wait()
  997. end
  998. end
  999. end
  1000.  
  1001. local RbxUtility = LoadLibrary("RbxUtility")
  1002. local Create = RbxUtility.Create
  1003.  
  1004. function RemoveOutlines(part)
  1005. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  1006. end
  1007.  
  1008. CFuncs = {
  1009. ["Part"] = {
  1010. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  1011. local Part = Create("Part"){
  1012. Parent = Parent,
  1013. Reflectance = Reflectance,
  1014. Transparency = Transparency,
  1015. CanCollide = false,
  1016. Locked = true,
  1017. BrickColor = BrickColor.new(tostring(BColor)),
  1018. Name = Name,
  1019. Size = Size,
  1020. Material = Material,
  1021. }
  1022. RemoveOutlines(Part)
  1023. return Part
  1024. end;
  1025. };
  1026.  
  1027. ["Mesh"] = {
  1028. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  1029. local Msh = Create(Mesh){
  1030. Parent = Part,
  1031. Offset = OffSet,
  1032. Scale = Scale,
  1033. }
  1034. if Mesh == "SpecialMesh" then
  1035. Msh.MeshType = MeshType
  1036. Msh.MeshId = MeshId
  1037. end
  1038. return Msh
  1039. end;
  1040. };
  1041.  
  1042. ["Mesh"] = {
  1043. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  1044. local Msh = Create(Mesh){
  1045. Parent = Part,
  1046. Offset = OffSet,
  1047. Scale = Scale,
  1048. }
  1049. if Mesh == "SpecialMesh" then
  1050. Msh.MeshType = MeshType
  1051. Msh.MeshId = MeshId
  1052. end
  1053. return Msh
  1054. end;
  1055. };
  1056.  
  1057. ["Weld"] = {
  1058. Create = function(Parent, Part0, Part1, C0, C1)
  1059. local Weld = Create("Weld"){
  1060. Parent = Parent,
  1061. Part0 = Part0,
  1062. Part1 = Part1,
  1063. C0 = C0,
  1064. C1 = C1,
  1065. }
  1066. return Weld
  1067. end;
  1068. };
  1069.  
  1070. ["Sound"] = {
  1071. Create = function(id, par, vol, pit)
  1072. coroutine.resume(coroutine.create(function()
  1073. local S = Create("Sound"){
  1074. Volume = vol,
  1075. Pitch = pit or 1,
  1076. SoundId = id,
  1077. Parent = par or workspace,
  1078. }
  1079. Instance.new("DistortionSoundEffect", S).Level = 1
  1080. wait()
  1081. S:play()
  1082. game:GetService("Debris"):AddItem(S, 10)
  1083. end))
  1084. end;
  1085. };
  1086.  
  1087. ["ParticleEmitter"] = {
  1088. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  1089. local fp = Create("ParticleEmitter"){
  1090. Parent = Parent,
  1091. Color = ColorSequence.new(Color1, Color2),
  1092. LightEmission = LightEmission,
  1093. Size = Size,
  1094. Texture = Texture,
  1095. Transparency = Transparency,
  1096. ZOffset = ZOffset,
  1097. Acceleration = Accel,
  1098. Drag = Drag,
  1099. LockedToPart = LockedToPart,
  1100. VelocityInheritance = VelocityInheritance,
  1101. EmissionDirection = EmissionDirection,
  1102. Enabled = Enabled,
  1103. Lifetime = LifeTime,
  1104. Rate = Rate,
  1105. Rotation = Rotation,
  1106. RotSpeed = RotSpeed,
  1107. Speed = Speed,
  1108. VelocitySpread = VelocitySpread,
  1109. }
  1110. return fp
  1111. end;
  1112. };
  1113. }
  1114.  
  1115. function rayCast(Position, Direction, Range, Ignore)
  1116. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  1117. end
  1118.  
  1119. local function GetNearest(obj, distance)
  1120. local last, lastx = distance + 1
  1121. for i, v in pairs(workspace:GetChildren()) do
  1122. if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
  1123. local t = v.Torso
  1124. local dist = (t.Position - obj.Position).magnitude
  1125. if dist <= distance then
  1126. if dist < last then
  1127. last = dist
  1128. lastx = v
  1129. end
  1130. end
  1131. end
  1132. end
  1133. return lastx
  1134. end
  1135.  
  1136. --[[ Credits to Kert109 (Ninja_Deer) for the Damage function. Fenrier for the Magnitude Damage ]]--
  1137.  
  1138. function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch)
  1139. for i, v in pairs(hit:GetChildren()) do
  1140. if v:IsA("Humanoid") and hit.Name ~= Character.Name then
  1141. local find = v:FindFirstChild("DebounceHit")
  1142. if not find then
  1143. if v.Parent:findFirstChild("Head") then
  1144. local BillG = Create("BillboardGui"){
  1145. Parent = v.Parent.Head,
  1146. Size = UDim2.new(1, 0, 1, 0),
  1147. Adornee = v.Parent.Head,
  1148. StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)),
  1149. }
  1150. local TL = Create("TextLabel"){
  1151. Parent = BillG,
  1152. Size = UDim2.new(3, 3, 3, 3),
  1153. BackgroundTransparency = 1,
  1154. Text = tostring(damage).."-",
  1155. TextColor3 = Color1.Color,
  1156. TextStrokeColor3 = Color2.Color,
  1157. TextStrokeTransparency = 0,
  1158. TextXAlignment = Enum.TextXAlignment.Center,
  1159. TextYAlignment = Enum.TextYAlignment.Center,
  1160. FontSize = Enum.FontSize.Size18,
  1161. Font = "ArialBold",
  1162. }
  1163. coroutine.resume(coroutine.create(function()
  1164. swait(1)
  1165. for i = 0, 1, .1 do
  1166. swait(.1)
  1167. BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0)
  1168. end
  1169. BillG:Destroy()
  1170. end))
  1171. end
  1172. v.Health = v.Health - damage
  1173. local bool = Create("BoolValue"){
  1174. Parent = v,
  1175. Name = "DebounceHit",
  1176. }
  1177. if HSound ~= nil and HPitch ~= nil then
  1178. CFuncs["Sound"].Create(HSound, hit, 1, HPitch)
  1179. end
  1180. game:GetService("Debris"):AddItem(bool, cooldown)
  1181. end
  1182. end
  1183. end
  1184. end
  1185.  
  1186. function MagnitudeDamage(Part, magni, mindam, maxdam, Color1, Color2, HSound, HPitch)
  1187. for _, c in pairs(workspace:children()) do
  1188. local hum = c:findFirstChild("Humanoid")
  1189. if hum ~= nil then
  1190. local head = c:findFirstChild("Torso")
  1191. if head ~= nil then
  1192. local targ = head.Position - Part.Position
  1193. local mag = targ.magnitude
  1194. if mag <= magni and c.Name ~= Player.Name then
  1195. Damage(head.Parent, math.random(mindam, maxdam), 0.5, Color1, Color2, HSound, HPitch)
  1196. end
  1197. end
  1198. end
  1199. end
  1200. end
  1201.  
  1202. Handle = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "Handle", Vector3.new(0.399999946, 0.899999976, 0.400000095))
  1203. HandleWeld = CFuncs["Weld"].Create(m, Character["Right Arm"], Handle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.199958801, -0.0500774384, -1.09998882, -1, 0, 0, 0, 0, -1, -0, -1, -0))
  1204. FakeHandle = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "FakeHandle", Vector3.new(0.399999946, 0.899999976, 0.400000095))
  1205. FakeHandleWeld = CFuncs["Weld"].Create(m, Handle, FakeHandle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.199996948, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  1206. Barrel = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 1, "Medium stone grey", "Barrel", Vector3.new(0.399999946, 0.399999976, 0.400000095))
  1207. BarrelWeld = CFuncs["Weld"].Create(m, FakeHandle, Barrel, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0, -0.749999046, -1.50000024, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  1208. Part = CFuncs["Part"].Create(m, Enum.Material.SmoothPlastic, 0, 0, "Medium stone grey", "Part", Vector3.new(0.399999946, 0.299999952, 0.400000095))
  1209. PartWeld = CFuncs["Weld"].Create(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0, -0.300000191, -0.400000095, 1, 0, 0, 0, 1, 0, 0, 0, 1))
  1210. CFuncs["Mesh"].Create("SpecialMesh", Part, Enum.MeshType.FileMesh, "rbxassetid://435840330", Vector3.new(0, 0, 0), Vector3.new(0.00200000009, 0.00200000009, 0.00200000009))
  1211. Part.Mesh.TextureId = "rbxassetid://435840335"
  1212.  
  1213. EffectModel = Instance.new("Model", Character)
  1214. EffectModel.Name = "Effects"
  1215.  
  1216. Effects = {
  1217. ["Block"] = {
  1218. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  1219. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1220. prt.Anchored = true
  1221. prt.CFrame = cframe
  1222. local msh = CFuncs["Mesh"].Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1223. game:GetService("Debris"):AddItem(prt, 10)
  1224. if Type == 1 or Type == nil then
  1225. table.insert(Effects, {
  1226. prt,
  1227. "Block1",
  1228. delay,
  1229. x3,
  1230. y3,
  1231. z3,
  1232. msh
  1233. })
  1234. elseif Type == 2 then
  1235. table.insert(Effects, {
  1236. prt,
  1237. "Block2",
  1238. delay,
  1239. x3,
  1240. y3,
  1241. z3,
  1242. msh
  1243. })
  1244. end
  1245. end;
  1246. };
  1247.  
  1248. ["Cylinder"] = {
  1249. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1250. local prt = CFuncs["Part"].Create(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.2, 0.2, 0.2))
  1251. prt.Anchored = true
  1252. prt.CFrame = cframe
  1253. local msh = CFuncs["Mesh"].Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1254. game:GetService("Debris"):AddItem(prt, 2)
  1255. Effects[#Effects + 1] = {
  1256. prt,
  1257. "Cylinder",
  1258. delay,
  1259. x3,
  1260. y3,
  1261. z3
  1262. }
  1263. end;
  1264. };
  1265.  
  1266. ["Sphere"] = {
  1267. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1268. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1269. prt.Anchored = true
  1270. prt.CFrame = cframe
  1271. local msh = CFuncs["Mesh"].Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1272. game:GetService("Debris"):AddItem(prt, 10)
  1273. table.insert(Effects, {
  1274. prt,
  1275. "Cylinder",
  1276. delay,
  1277. x3,
  1278. y3,
  1279. z3,
  1280. msh
  1281. })
  1282. end;
  1283. };
  1284.  
  1285. ["Elec"] = {
  1286. Create = function(cff, x, y, z)
  1287. local prt = CFuncs["Part"].Create(workspace, "Neon", 0, 0, BrickColor.new("Lime green"), "Part", Vector3.new(1, 1, 1))
  1288. prt.Anchored = true
  1289. prt.CFrame = cff * CFrame.new(math.random(-x, x), math.random(-y, y), math.random(-z, z))
  1290. prt.CFrame = CFrame.new(prt.Position)
  1291. game:GetService("Debris"):AddItem(prt, 2)
  1292. local xval = math.random() / 2
  1293. local yval = math.random() / 2
  1294. local zval = math.random() / 2
  1295. local msh = CFuncs["Mesh"].Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(xval, yval, zval))
  1296. table.insert(Effects, {
  1297. prt,
  1298. "Elec",
  1299. 0.1,
  1300. x,
  1301. y,
  1302. z,
  1303. xval,
  1304. yval,
  1305. zval
  1306. })
  1307. end;
  1308.  
  1309. };
  1310.  
  1311. ["Ring"] = {
  1312. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1313. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1314. prt.Anchored = true
  1315. prt.CFrame = cframe
  1316. local msh = CFuncs["Mesh"].Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1317. game:GetService("Debris"):AddItem(prt, 10)
  1318. table.insert(Effects, {
  1319. prt,
  1320. "Cylinder",
  1321. delay,
  1322. x3,
  1323. y3,
  1324. z3,
  1325. msh
  1326. })
  1327. end;
  1328. };
  1329.  
  1330.  
  1331. ["Wave"] = {
  1332. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1333. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  1334. prt.Anchored = true
  1335. prt.CFrame = cframe
  1336. local msh = CFuncs["Mesh"].Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1337. game:GetService("Debris"):AddItem(prt, 10)
  1338. table.insert(Effects, {
  1339. prt,
  1340. "Cylinder",
  1341. delay,
  1342. x3,
  1343. y3,
  1344. z3,
  1345. msh
  1346. })
  1347. end;
  1348. };
  1349.  
  1350. ["Break"] = {
  1351. Create = function(brickcolor, cframe, x1, y1, z1)
  1352. local prt = CFuncs["Part"].Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  1353. prt.Anchored = true
  1354. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1355. local msh = CFuncs["Mesh"].Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1356. local num = math.random(10, 50) / 1000
  1357. game:GetService("Debris"):AddItem(prt, 10)
  1358. table.insert(Effects, {
  1359. prt,
  1360. "Shatter",
  1361. num,
  1362. prt.CFrame,
  1363. math.random() - math.random(),
  1364. 0,
  1365. math.random(50, 100) / 100
  1366. })
  1367. end;
  1368. };
  1369. }
  1370.  
  1371. Shoot2 = function(orgpos)
  1372. local MouseLook = CFrame.new((orgpos + mouse.Hit.p) / 2, mouse.Hit.p)
  1373. Effects["Sphere"].Create(BrickColor.new("New Yeller"), CFrame.new(orgpos), 5, 5, 5, 3, 3, 3, 0.1)
  1374. table.insert(Effects, {
  1375. MouseLook.lookVector,
  1376. "Shoot2",
  1377. 50,
  1378. orgpos,
  1379. 5,
  1380. 7,
  1381. 0,
  1382. 1,
  1383. 2
  1384. })
  1385. end
  1386.  
  1387. function attackone()
  1388. attack = true
  1389. CFuncs["Sound"].Create("rbxassetid://243053454", Torso, .1, 2.8)
  1390. for i = 0, 1, 0.025 do
  1391. swait()
  1392. PlayAnimationFromTable({
  1393. CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1394. CFrame.new(0, 1.4999907, 3.42726707e-007, 1, 0, 0, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1395. CFrame.new(0.431798398, 0.400000006, -0.888215482, 0.939692736, 0.342019886, 0, 0, 0, -1, -0.342019916, 0.939692736, 0) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1396. CFrame.new(-0.559965074, 0.300000012, -0.828456283, 0.939692736, -0.342019886, 0, 0, 0, -1, 0.342019916, 0.939692736, 0) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1397. CFrame.new(0.599619746, -1.99127948, 0, 0.996194661, -0.087155968, 0, 0.087155968, 0.996194661, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1398. CFrame.new(-0.599619746, -1.99127901, 0, 0.996194661, 0.087155968, 0, -0.087155968, 0.996194661, 0, -0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1399. }, .3, false)
  1400. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)), 0.3)
  1401. end
  1402. CFuncs["Sound"].Create("rbxassetid://203691837", Barrel, .01, .3)
  1403. CFuncs["Sound"].Create("rbxassetid://131384028", Barrel, .01, .9)
  1404. CFuncs["Sound"].Create("rbxassetid://184718741", Barrel, .05, .9)
  1405. Shoot2(Barrel.Position)
  1406. for i = 0, 1, 0.15 do
  1407. swait()
  1408. RootPart.Velocity = RootPart.CFrame.lookVector * -50
  1409. PlayAnimationFromTable({
  1410. CFrame.new(-0, -0.281125277, 0.157014638, 1, 0, -0, 0, 0.906307876, -0.422617942, 0, 0.422617942, 0.906307876) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1411. CFrame.new(0, 1.4999938, 1.05202198e-005, 1, 0, -0, 0, 0.965925813, 0.258818924, -0, -0.258818924, 0.965925813) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1412. CFrame.new(0.406597674, 0.817824185, -0.957423151, 0.939692974, 0.280165672, -0.196174338, -5.36441803e-007, -0.573575616, -0.819152534, -0.34201926, 0.769751906, -0.538984895) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1413. CFrame.new(-0.506752789, 0.775180221, -0.974653006, 0.939692974, -0.280165732, 0.196174279, 5.36441803e-007, -0.573575556, -0.819152713, 0.34201926, 0.769752145, -0.538984716) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1414. CFrame.new(0.566868722, -1.61683154, -0.13679418, 0.954536259, -0.174988821, -0.241328761, 0.172366679, 0.984509468, -0.0321052969, 0.243208498, -0.0109513998, 0.969912171) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1415. CFrame.new(-0.545306504, -1.37044179, -0.679420352, 0.996202111, 0.0754783303, 0.0434113704, -0.0434117466, 0.862729907, -0.503797948, -0.0754781216, 0.49999994, 0.862729967) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1416. }, .6, false)
  1417. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(-30), math.rad(-20), math.rad(0)), 0.3)
  1418. end
  1419. for i = 0, 1, 0.15 do
  1420. swait()
  1421. RootPart.Velocity = RootPart.CFrame.lookVector * -100
  1422. PlayAnimationFromTable({
  1423. CFrame.new(-0, -0.795007467, 0.0831707418, 1, 0, -0, 0, 0.76604414, -0.642788053, 0, 0.642788053, 0.76604414) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1424. CFrame.new(0, 1.49999774, 1.20103359e-005, 1, 0, -0, 0, 0.965925634, 0.258819878, -0, -0.258819878, 0.965925634) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1425. CFrame.new(1.70605683, 1.21151328, -0.185158521, 0.893217862, -0.29338178, -0.340718448, -0.340719074, -0.936116338, -0.0871595442, -0.293381065, 0.193941653, -0.936116695) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1426. CFrame.new(-1.69524968, 1.05172348, -0.252849877, 0.812758088, 0.493294626, 0.309975445, 0.582562625, -0.694268882, -0.422624737, 0.00672781467, 0.524071693, -0.851647615) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1427. CFrame.new(0.689150453, -1.88461804, -0.0157705098, 0.954536736, -0.174989104, -0.241326213, 0.172367141, 0.984509468, -0.0321044922, 0.243205875, -0.0109517872, 0.969912887) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1428. CFrame.new(-0.536899447, -1.34506011, -0.583059072, 0.99620223, 0.0226762109, 0.0840658173, -0.043412663, 0.966281295, 0.253803402, -0.0754759163, -0.256489068, 0.963595748) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1429. }, .2, false)
  1430. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-50), math.rad(0)), 0.3)
  1431. end
  1432. for i = 0, 1, 0.05 do
  1433. swait()
  1434. RootPart.Velocity = RootPart.CFrame.lookVector * -50
  1435. PlayAnimationFromTable({
  1436. CFrame.new(-0, -2.09708667, 0.108620644, 1, 0, -0, 0, 0.573575675, -0.819152594, 0, 0.819152594, 0.573575675) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1437. CFrame.new(0, 1.53697455, -0.422635257, 1, 0, -0, 0, 0.766043842, 0.64278841, -0, -0.64278841, 0.766043842) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1438. CFrame.new(1.57810855, 0.650130272, 0.33058399, 0.930655897, -0.284022599, -0.230674848, 0.352510452, 0.527023435, 0.773293555, -0.0980618149, -0.800985396, 0.590598404) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1439. CFrame.new(-1.38994181, 0.87733829, 0.667137444, 0.963715255, 0.08906921, 0.251633942, -0.25866431, 0.0788001418, 0.962747812, 0.0659223944, -0.992903471, 0.0989798903) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1440. CFrame.new(0.774198592, -1.52057803, -0.607582211, 0.954536974, -0.272207022, -0.121501081, 0.172365844, 0.83655864, -0.520057499, 0.243206039, 0.475471497, 0.845445395) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1441. CFrame.new(-0.530096769, -1.05517173, -0.660005629, 0.99620223, 0.0226761587, 0.0840661526, -0.0434127897, 0.966280818, 0.253804684, -0.0754762068, -0.256490231, 0.96359539) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1442. }, .3, false)
  1443. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-60), math.rad(0)), 0.3)
  1444. end
  1445. for i = 0, 1, 0.13 do
  1446. swait()
  1447. PlayAnimationFromTable({
  1448. CFrame.new(-0, -1.01349139, -0.251608461, 1, 0, 0, 0, 0.707105339, 0.707108378, 0, -0.707108378, 0.707105339) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1449. CFrame.new(0.0127754211, 1.44207788, 0.0749337673, 1, 0, 0, 0, 0.939691544, -0.342023343, 0, 0.342023343, 0.939691544) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1450. CFrame.new(1.62296665, 0.191783041, -0.192457974, 0.930656254, -0.329096794, 0.159920022, 0.352511466, 0.923570275, -0.150843769, -0.098055169, 0.196757287, 0.975536823) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1451. CFrame.new(-0.870643735, 0.71258086, -0.942903101, 0.18127799, -0.372358024, -0.910213113, -0.781424284, 0.507405519, -0.363202393, 0.597088516, 0.777103186, -0.19898814) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1452. CFrame.new(0.214147568, -1.73508716, -0.0895051956, 0.924306214, 0.282332808, -0.256800473, -0.113861978, 0.846218646, 0.520528436, 0.364271581, -0.451887846, 0.814311981) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1453. CFrame.new(-0.535767198, -0.599929333, -0.996632636, 0.996202111, 0.0754788443, 0.0434101112, -0.0434126705, 0.862728953, -0.503799856, -0.0754773915, 0.500001788, 0.862729192) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1454. }, .3, false)
  1455. end
  1456. attack = false
  1457. end
  1458.  
  1459. --[[Attacks]]--
  1460.  
  1461. mouse.Button1Down:connect(function()
  1462. if attack == false and attacktype == 1 then
  1463. attackone()
  1464. end
  1465. end)
  1466.  
  1467. mouse.KeyDown:connect(function(k)
  1468. k = k:lower()
  1469. if attack == false and k == '' then
  1470.  
  1471. end
  1472. end)
  1473.  
  1474. while true do
  1475. swait()
  1476. for i, v in pairs(Character:GetChildren()) do
  1477. if v:IsA("Part") then
  1478. v.Material = "SmoothPlastic"
  1479. elseif v:IsA("Accessory") then
  1480. v:WaitForChild("Handle").Material = "SmoothPlastic"
  1481. end
  1482. end
  1483. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  1484. velocity = RootPart.Velocity.y
  1485. sine = sine + change
  1486. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  1487. if equipped == true or equipped == false then
  1488. if RootPart.Velocity.y > 1 and hit == nil then
  1489. Anim = "Jump"
  1490. if attack == false then
  1491. PlayAnimationFromTable({
  1492. CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1493. CFrame.new(0, 1.49221826, -0.044082582, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1494. CFrame.new(1.66304386, 0.182627335, 0.00782334805, 0.883022726, -0.392632574, 0.257119894, 0.321392894, 0.905103981, 0.2783764, -0.342019886, -0.163176134, 0.925416708) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1495. CFrame.new(-1.66570556, 0.224230319, 0.110721856, 0.903736115, 0.408218145, -0.128915116, -0.34750703, 0.875426054, 0.33595863, 0.25000003, -0.258819014, 0.933012724) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1496. CFrame.new(0.499999166, -1.99999452, 4.76837158e-007, 0.984807849, -5.94328526e-007, -0.173648044, 0.0449439958, 0.965925872, 0.254886925, 0.167730987, -0.258819073, 0.951251388) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1497. CFrame.new(-0.499999404, -1.51703107, -0.129407585, 0.965925753, 6.6929374e-007, 0.258819193, -0.0669879839, 0.965925813, 0.24999994, -0.24999994, -0.258819163, 0.933012724) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1498. }, .3, false)
  1499. end
  1500. elseif RootPart.Velocity.y < -1 and hit == nil then
  1501. Anim = "Fall"
  1502. if attack == false then
  1503. PlayAnimationFromTable({
  1504. CFrame.new(-0, -0, -0, 1, 0, 0, 0, 1, 0, 0, 0, 1) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1505. CFrame.new(0, 1.49221873, -0.0440826714, 1, 0, 0, 0, 0.984807849, 0.173647985, 0, -0.173647985, 0.984807849) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1506. CFrame.new(1.76076102, 0.406842887, 0.0212866664, 0.695482016, -0.670965135, 0.257119834, 0.611573994, 0.74059701, 0.278376371, -0.377202988, -0.0363579579, 0.925416648) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1507. CFrame.new(-1.68029141, 0.390803367, 0.155905366, 0.70961535, 0.692695498, -0.128914997, -0.625963271, 0.703777075, 0.335958213, 0.323444158, -0.157705069, 0.933012843) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1508. CFrame.new(0.693307817, -1.96826017, -0.0605875254, 0.986561239, -0.127662987, -0.101976946, 0.137943029, 0.985269904, 0.101069227, 0.0875720233, -0.113777988, 0.989639223) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1509. CFrame.new(-0.526552737, -1.81498528, -0.152177691, 0.965925574, 0.0449441113, 0.254888207, -0.066988036, 0.994663239, 0.0784704387, -0.250001162, -0.0928710476, 0.963781357) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1510. }, .3, false)
  1511. end
  1512. elseif Torsovelocity < 1 and hit ~= nil then
  1513. Anim = "Idle"
  1514. if attack == false then
  1515. change = 1
  1516. PlayAnimationFromTable({
  1517. CFrame.new(1.22602091e-006, -0.219458103, 1.46111324e-006, 0.76604414, 0, 0.642788053, 0, 1, 0, -0.642788053, 0, 0.76604414) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1518. CFrame.new(0, 1.49999201, 0, 0.707106233, 0, -0.707107306, 0, 1, 0, 0.707107306, 0, 0.707106233) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1519. CFrame.new(0.571566343, -0.0739164352, -0.639066696, 0.939692855, 0.340718329, -0.0298085809, -0.241844058, 0.600305915, -0.762328327, -0.241844922, 0.723563433, 0.646503866) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1520. CFrame.new(-0.628383756, -0.12163578, -0.696761668, 0.939692736, -0.342020065, -5.06639481e-007, 0.196173996, 0.538984895, -0.819152653, 0.280166954, 0.769751549, 0.573575616) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1521. CFrame.new(0.624118924, -1.79798961, 0.0678238794, 0.995454907, -0.0383867361, -0.0871553123, 0.0385330059, 0.999257326, -4.09960694e-006, 0.0870907605, -0.00335427374, 0.996194839) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1522. CFrame.new(-0.53866595, -1.82180798, 0.00821807235, 0.977763176, 0.0281341001, 0.207816422, -0.0287620034, 0.999586344, -1.4934686e-007, -0.207730502, -0.00597707182, 0.978167892) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1523. }, .3, false)
  1524. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-20), math.rad(0)), 0.3)
  1525. end
  1526. elseif Torsovelocity > 2 and hit ~= nil then
  1527. Anim = "Walk"
  1528. if attack == false then
  1529. change = 3
  1530. PlayAnimationFromTable({
  1531. CFrame.new(0, -0.0240751095, -0.146390602, 1, 0, 0, 0, 0.965925872, 0.258818984, 0, -0.258818984, 0.965925872) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1532. CFrame.new(0, 1.49999237, -1.81794167e-006, 1, 0, 0, 0, 0.984807789, -0.173647881, 0, 0.173647881, 0.984807789) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1533. CFrame.new(0.172261134, 0.427689523, -1.09730911, 0.644483984, 0.748984814, -0.153825179, 0.413525045, -0.510645986, -0.753815472, -0.643146515, 0.422211438, -0.638827145) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1534. CFrame.new(-1.1922102, 0.363029838, -0.448653877, 0.935289383, -0.110854559, -0.33607316, -0.341521561, -0.531564534, -0.775114357, -0.0927196145, 0.839732468, -0.535025835) * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0),
  1535. CFrame.new(.5, -1.85 - 0.5 * math.cos(sine / 8) / 2, 0 + 1.8 * math.sin(sine / 8) / 2) * angles(math.rad(-50 * math.sin(sine / 8)), math.rad(0), math.rad(0)),
  1536. CFrame.new(-.5, -1.85 + 0.5 * math.cos(sine / 8) / 2, 0 - 1.8 * math.sin(sine / 8) / 2) * angles(math.rad(50 * math.sin(sine / 8)), math.rad(0), math.rad(0)),
  1537. }, .3, false)
  1538. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(-30), math.rad(0)), 0.3)
  1539. end
  1540. end
  1541. end
  1542. if 0 < #Effects then
  1543. for e = 1, #Effects do
  1544. if Effects[e] ~= nil then
  1545. local Thing = Effects[e]
  1546. if Thing ~= nil then
  1547. local Part = Thing[1]
  1548. local Mode = Thing[2]
  1549. local Delay = Thing[3]
  1550. local IncX = Thing[4]
  1551. local IncY = Thing[5]
  1552. local IncZ = Thing[6]
  1553. if Thing[2] == "Shoot" then
  1554. local Look = Thing[1]
  1555. local hit, pos = rayCast(Thing[4], Look, 15, Character)
  1556. local mag = (Thing[4] - pos).magnitude
  1557. Thing[9] = Thing[9] + 0.5
  1558. Thing[5] = Thing[5] + 0.2
  1559. Thing[6] = Thing[6] + 0.2
  1560. Effects["Cylinder"].Create(BrickColor.new("New Yeller"), CFrame.new((Thing[4] + pos) / 2, pos) * angles(1.57, 0, 0), Thing[9], mag * 5, Thing[9], -0.2, 0, -0.2, 0.1)
  1561. Thing[4] = Thing[4] + Look * 15
  1562. Thing[3] = Thing[3] - 1
  1563. if hit ~= nil then
  1564. Thing[3] = 0
  1565. ref = CFuncs["Part"].Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
  1566. ref.Anchored = true
  1567. ref.CFrame = CFrame.new(pos)
  1568. Effects["Sphere"].Create(BrickColor.new("New Yeller"), CFrame.new(pos), 5, 5, 5, 1, 1, 1, 0.07)
  1569. CFuncs["Sound"].Create("rbxassetid://315748949", ref, 1, 1.1)
  1570. game:GetService("Debris"):AddItem(ref, 1)
  1571. end
  1572. if Thing[3] <= 0 then
  1573. table.remove(Effects, e)
  1574. end
  1575. end
  1576. do
  1577. if Thing[2] == "Shoot2" then
  1578. local Look = Thing[1]
  1579. local hit, pos = rayCast(Thing[4], Look, 3, Character)
  1580. local mag = (Thing[4] - pos).magnitude
  1581. Thing[9] = Thing[9] + 0.5
  1582. Thing[5] = Thing[5] + 0.2
  1583. Thing[6] = Thing[6] + 0.2
  1584. Effects["Sphere"].Create(BrickColor.new("New Yeller"), CFrame.new((Thing[4] + pos) / 2, pos), 25, 25, 25, -5, -5, -5, 0.2)
  1585. Thing[4] = Thing[4] + Look * 3
  1586. Thing[3] = Thing[3] + 5
  1587. if hit ~= nil then
  1588. Thing[3] = 0
  1589. ref = CFuncs["Part"].Create(workspace, "Neon", 0, 1, BrickColor.new("Really red"), "Reference", Vector3.new())
  1590. ref.Anchored = true
  1591. ref.CFrame = CFrame.new(pos)
  1592. Effects["Sphere"].Create(BrickColor.new("New Yeller"), CFrame.new(pos), 25, 25, 25, 5, 5, 5, 0.01)
  1593. Effects["Sphere"].Create(BrickColor.new("New Yeller"), CFrame.new(pos), 10, 10, 10, 15, 15, 15, 0.01)
  1594. Effects["Block"].Create(BrickColor.new("New Yeller"), CFrame.new(pos), 10, 10, 10, 15, 15, 15, 0.01, 1)
  1595. Effects["Wave"].Create(BrickColor.new("New Yeller"), CFrame.new(pos), 2, 2, 2, 3, 3, 3, 0.01)
  1596. CFuncs["Sound"].Create("rbxassetid://203691837", ref, 1, .3)
  1597. CFuncs["Sound"].Create("rbxassetid://203691885", ref, 1, .9)
  1598. CFuncs["Sound"].Create("rbxassetid://184718741", ref, 1, .9)
  1599. local e = Instance.new("Explosion", ref)
  1600. e.Position = ref.Position
  1601. e.BlastRadius = 400
  1602. e.DestroyJointRadiusPercent = 20
  1603. e.Visible = false
  1604. e.ExplosionType = "CratersAndDebris"
  1605. game:GetService("Debris"):AddItem(ref, 10)
  1606. end
  1607. if Thing[3] <= 0 then
  1608. table.remove(Effects, e)
  1609. end
  1610. end
  1611. do
  1612. do
  1613. if Thing[2] ~= "Shoot" and Thing[2] ~= "DecreaseStat" and Thing[2] ~= "showDamage" and Thing[2] ~= "Shoot2" then
  1614. if Thing[1].Transparency <= 1 then
  1615. if Thing[2] == "Block1" then
  1616. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1617. Mesh = Thing[7]
  1618. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1619. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1620. else
  1621. if Thing[2] == "Block2" then
  1622. Thing[1].CFrame = Thing[1].CFrame
  1623. Mesh = Thing[7]
  1624. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1625. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1626. else
  1627. if Thing[2] == "Block3" then
  1628. Thing[8].C0 = CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) * Thing[9]
  1629. Mesh = Thing[7]
  1630. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1631. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1632. else
  1633. if Thing[2] == "Cylinder" then
  1634. Mesh = Thing[7]
  1635. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1636. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1637. else
  1638. if Thing[2] == "Cylinder2" then
  1639. Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, Thing[8], 0)
  1640. Mesh = Thing[7]
  1641. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1642. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1643. else
  1644. if Thing[2] == "Blood" then
  1645. Mesh = Thing[7]
  1646. Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 0.5, 0)
  1647. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1648. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1649. else
  1650. if Thing[2] == "Elec" then
  1651. Mesh = Thing[10]
  1652. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1653. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1654. else
  1655. if Thing[2] == "Disappear" then
  1656. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1657. end
  1658. end
  1659. end
  1660. end
  1661. end
  1662. end
  1663. end
  1664. end
  1665. else
  1666. Part.Parent = nil
  1667. table.remove(Effects, e)
  1668. end
  1669. end
  1670. end
  1671. end
  1672. end
  1673. end
  1674. end
  1675. end
  1676. end
  1677. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement