Advertisement
DylanD2003

Untitled

Oct 13th, 2017
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 92.28 KB | None | 0 0
  1.  
  2.  
  3.  
  4. --[[
  5. Tf2 Engineer Class
  6. --------------------
  7. Script by: 123jl123
  8. ---------------------
  9. Sentry by: Madiik
  10. -- ]]
  11.  
  12.  
  13. local plr = game:service'Players'.LocalPlayer
  14. local char = plr.Character
  15. local mouse = plr:GetMouse()
  16. local humanoid = char:findFirstChild("Humanoid")
  17. local torso = char:findFirstChild("Torso")
  18. local head = char.Head
  19. local ra = char:findFirstChild("Right Arm")
  20. local la = char:findFirstChild("Left Arm")
  21. local rl = char:findFirstChild("Right Leg")
  22. local ll = char:findFirstChild("Left Leg")
  23. local rs = torso:findFirstChild("Right Shoulder")
  24. local ls = torso:findFirstChild("Left Shoulder")
  25. local rh = torso:findFirstChild("Right Hip")
  26. local lh = torso:findFirstChild("Left Hip")
  27. local neck = torso:findFirstChild("Neck")
  28. local rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  29. local rootpart = char:findFirstChild("HumanoidRootPart")
  30. local camera = workspace.CurrentCamera
  31. local anim = char:findFirstChild("Animate")
  32. DA = false
  33. NoSentry = true
  34. maincolor = game.Players.LocalPlayer.Character.Torso.BrickColor.Name
  35. secondcolor = "Really black"
  36. WSHM = {'10209908','10209905','10209905','10209908'}
  37. WSH = WSHM[math.random(1,#WSHM)]
  38. wait(1 / 60)
  39. Effects = { }
  40. local Player = game.Players.localPlayer
  41. local Character = Player.Character
  42. local Humanoid = Character.Humanoid
  43. local mouse = Player:GetMouse()
  44. local LeftArm = Character["Left Arm"]
  45. local RightArm = Character["Right Arm"]
  46. local LeftLeg = Character["Left Leg"]
  47. local RightLeg = Character["Right Leg"]
  48. local Head = Character.Head
  49. local Torso = Character.Torso
  50. local cam = game.Workspace.CurrentCamera
  51. local RootPart = Character.HumanoidRootPart
  52. local RootJoint = RootPart.RootJoint
  53. local equipped = false
  54. local attack = false
  55. local Anim = 'Idle'
  56. local idle = 0
  57. local attacktype = 1
  58. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  59. local velocity = RootPart.Velocity.y
  60. local sine = 0
  61. local change = 1
  62. local grabbed = false
  63. local cn = CFrame.new
  64. local mr = math.rad
  65. local angles = CFrame.Angles
  66. local ud = UDim2.new
  67. local c3 = Color3.new
  68. local slashDamage = 15
  69. trans = 1
  70. Wep = 1
  71. equippedgun2 = false
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82. --SB Plasma Shotgun 2013
  83.  
  84. --madiik's plasma shottie
  85.  
  86. --variables
  87.  
  88.  
  89.  
  90. --some more variables
  91.  
  92. local spread = 1
  93. -- end of some more variables
  94.  
  95. local sound = Instance.new("Sound",head)
  96. sound.SoundId = "http://www.roblox.com/asset?id=10209842"
  97. sound.Volume = 2
  98. sound.Pitch = 1
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106. local sound2 = Instance.new("Sound",head)
  107. sound2.SoundId = "http://www.roblox.com/asset?id=10209881"
  108. sound2.Volume = 1
  109. sound2.Pitch = 1
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117. function attach(weld, part0, part1)
  118. weld.Part0 = part0
  119. weld.Part1 = part1
  120. end
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. --create func
  131. function part(parent, size, color, formfactor, collide, transparency)
  132. if transparency == nil then transparency = 0 end
  133. if collide == nil then collide = false end
  134. if formfactor == nil then formfactor = Enum.FormFactor.Custom end
  135. local p=Instance.new("Part", parent)
  136. p.FormFactor=formfactor
  137. p.CanCollide=false
  138. p.Size=size
  139. p.Locked=true
  140. p.Transparency=transparency
  141. p.Position=torso.Position
  142. p.BrickColor=color
  143. p.FrontSurface="SmoothNoOutlines"
  144. p.BackSurface="SmoothNoOutlines"
  145. p.LeftSurface="SmoothNoOutlines"
  146. p.BottomSurface="SmoothNoOutlines"
  147. p.TopSurface="SmoothNoOutlines"
  148. p.RightSurface="SmoothNoOutlines"
  149. return p
  150. end
  151. function wedge(parent, size, color, formfactor, collide, transparency)
  152.  
  153. if transparency == nil then transparency = 0 end
  154. if collide == nil then collide = false end
  155. if formfactor == nil then formfactor = Enum.FormFactor.Custom end
  156.  
  157. local p=Instance.new("WedgePart", parent)
  158. p.FormFactor=formfactor
  159. p.CanCollide=false
  160. p.Size=size
  161. p.Locked=true
  162. p.Position = torso.Position
  163. p.BrickColor=color
  164. p.FrontSurface="SmoothNoOutlines"
  165. p.BackSurface="SmoothNoOutlines"
  166. p.LeftSurface="SmoothNoOutlines"
  167. p.BottomSurface="SmoothNoOutlines"
  168. p.TopSurface="SmoothNoOutlines"
  169. p.RightSurface="SmoothNoOutlines"
  170. return p
  171. end
  172. function weld(part0, part1, c0, parent, c1)
  173. if parent == nil then parent = gun end
  174. if c1 == nil then c1 = CFrame.new() end
  175.  
  176. local wel=Instance.new("Weld", parent)
  177. wel.Part0 = part0
  178. wel.Part1 = part1
  179. wel.C0 = c0
  180. wel.C1 = c1
  181. return wel
  182. end
  183. function specialmesh(parent, meshType, scale, meshId)
  184. local mesh = Instance.new("SpecialMesh", parent)
  185. mesh.Scale = scale
  186. mesh.MeshType = meshType
  187. mesh.MeshId = meshId
  188. return mesh
  189. end
  190.  
  191.  
  192. --some ray functi0n
  193.  
  194. function rayCast2(speed, gravity, from)
  195. coroutine.wrap(function()
  196. if char.Humanoid.Health == 0 then return end
  197. local rayP = Instance.new("Part")
  198. rayP.Name = "rayP"
  199. rayP.BrickColor = BrickColor.new("New Yeller")
  200. rayP.Material = 'Neon'
  201. rayP.Anchored = true
  202. rayP.CanCollide = false
  203. rayP.Locked = true
  204. rayP.TopSurface = Enum.SurfaceType.Smooth
  205. rayP.BottomSurface = Enum.SurfaceType.Smooth
  206. rayP.formFactor = Enum.FormFactor.Custom
  207. rayP.Size = Vector3.new(0.2, 0.2, 0.2)
  208.  
  209.  
  210.  
  211. Instance.new("BlockMesh", rayP).Scale = Vector3.new(0.2, 0.2, 10)
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220. local bulletposition = from.Position + Vector3.new(0, 0.3, 0)
  221.  
  222. local bulletvelocity = (Vector3.new(math.random(-spread*4,spread*4), math.random(-spread*4,spread*4), math.random(-spread*4,spread*4)))+( plr:GetMouse().Hit.p - bulletposition).unit*speed
  223. local bulletlastposition = bulletposition
  224.  
  225.  
  226.  
  227.  
  228. coroutine.resume(coroutine.create(function()
  229. while true do
  230. local dt = wait()
  231. bulletlastposition = bulletposition
  232. bulletvelocity = bulletvelocity + (Vector3.new(0, -14.81*gravity, 0)*dt)
  233. bulletposition = bulletposition + (bulletvelocity*dt)
  234.  
  235. local ray = Ray.new(bulletlastposition, (bulletposition - bulletlastposition))
  236.  
  237. local hit, hitposition = workspace:FindPartOnRayWithIgnoreList( ray, { char, rayP, TrailPart} )
  238.  
  239. if (torso.Position - rayP.Position).magnitude > 540 then
  240. rayP:Destroy()
  241. break
  242. end
  243.  
  244.  
  245. if hit then
  246. local damage = math.random(666, 666666)
  247. if hit.Parent:findFirstChild("Humanoid") ~= nil then
  248. hit.Parent.Humanoid.Health = hit.Parent.Humanoid.Health - damage
  249. end
  250. if hit.Parent:IsA("Hat") and hit.Parent.Parent:findFirstChild("Humanoid") ~= nil then
  251. hit.Parent.Parent.Humanoid.Health = hit.Parent.Parent.Humanoid.Health - damage
  252. end
  253. bulletposition = hitposition
  254. rayP.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity)
  255. rayP:Destroy()
  256. break
  257. end
  258. rayP.CFrame = CFrame.new(bulletposition, bulletposition+bulletvelocity)
  259. rayP.Parent = workspace
  260. end
  261. end))
  262. end)()
  263. end
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271. --function attach(weld, part0, part1)
  272. --weld.Part0 = part0
  273. --weld.Part1 = part1
  274. --end
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302. TmRed = false
  303. TmBlue = false
  304. TeamColor = BrickColor.new("Really Black")
  305.  
  306.  
  307.  
  308. New = function(Object, Parent, Name, Data)
  309. local Object = Instance.new(Object)
  310. for Index, Value in pairs(Data or {}) do
  311. Object[Index] = Value
  312. end
  313. Object.Parent = Parent
  314. Object.Name = Name
  315. return Object
  316. end
  317. local AddInstance = function(Object, ...)
  318. local Obj = Instance.new(Object)
  319. for i,v in next,(...) do
  320. Obj[i] = v
  321. end
  322. return Obj
  323. end
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331. local MusThingHat = AddInstance("Part",{
  332. Parent = head,
  333. CFrame = head.CFrame,
  334. formFactor = "Symmetric",
  335. Size = Vector3.new(1, 1, 1),
  336. CanCollide = false,
  337. TopSurface = "Smooth",
  338. BottomSurface = "Smooth",
  339. Locked = true,
  340. BrickColor=BrickColor.new("Br. yellowish orange"),
  341. Transparency = 1,
  342. })
  343. local Weld = AddInstance("Weld",{
  344. Parent = MusThingHat,
  345. Part0 = head,
  346. C0 = CFrame.new(0,0.5,0)*CFrame.Angles(0,0,0),
  347. Part1 = MusThingHat,
  348. })
  349. local Mesh = AddInstance("SpecialMesh",{
  350. Parent = MusThingHat,
  351.  
  352. Scale = Vector3.new(.1,0,.1),
  353.  
  354. })
  355.  
  356. local Reaper = AddInstance("Part",{
  357. Parent = head,
  358. CFrame = head.CFrame,
  359. formFactor = "Symmetric",
  360. Size = Vector3.new(1, 1, 1),
  361. CanCollide = false,
  362. TopSurface = "Smooth",
  363. BottomSurface = "Smooth",
  364. Locked = true,
  365. BrickColor=BrickColor.new("Br. yellowish orange"),
  366. })
  367. local Weld = AddInstance("Weld",{
  368. Parent = Reaper,
  369. Part0 = head,
  370. C0 = CFrame.new(-.04,.7,-.1)*CFrame.Angles(0,0,.08),
  371. Part1 = Reaper,
  372. })
  373. local Mesh = AddInstance("SpecialMesh",{
  374. Parent = Reaper,
  375. MeshId = "rbxassetid://1073659",
  376. Scale = Vector3.new(0,0,0),
  377. VertexColor = Vector3.new(1,1,1),
  378. })
  379.  
  380. local Helmpart2 = AddInstance("Part",{
  381. Parent = head,
  382. CFrame = head.CFrame,
  383. formFactor = "Symmetric",
  384. Size = Vector3.new(1, 1, 1),
  385. CanCollide = false,
  386. TopSurface = "Smooth",
  387. BottomSurface = "Smooth",
  388. Locked = true,
  389. BrickColor=BrickColor.new("White"),
  390. })
  391. local Weld = AddInstance("Weld",{
  392. Parent = Helmpart2,
  393. Part0 = head,
  394. C0 = CFrame.new(.01,.4,.05)*CFrame.Angles(.1,0,-.02),
  395. Part1 = Helmpart2,
  396. })
  397. local Mesh = AddInstance("SpecialMesh",{
  398. Parent = Helmpart2,
  399. Scale = Vector3.new(0,0,0),
  400. VertexColor = Vector3.new(1,1,1),
  401. })
  402.  
  403.  
  404. local Glassespart2 = AddInstance("Part",{
  405. Parent = head,
  406. CFrame = head.CFrame,
  407. formFactor = "Symmetric",
  408. Size = Vector3.new(1, 1, 1),
  409. CanCollide = false,
  410. TopSurface = "Smooth",
  411. BottomSurface = "Smooth",
  412. Locked = true,
  413. BrickColor=BrickColor.new("Really black"),
  414. })
  415. local Weld = AddInstance("Weld",{
  416. Parent = Glassespart2,
  417. Part0 = head,
  418. C0 = CFrame.new(0,.35,0)*CFrame.Angles(0,0,0),
  419. Part1 = Glassespart2,
  420. })
  421. local Mesh = AddInstance("SpecialMesh",{
  422. Parent = Glassespart2,
  423. Scale = Vector3.new(0,.5,1.27),
  424. VertexColor = Vector3.new(1,1,1),
  425. })
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434. local Reaper3 = AddInstance("Part",{
  435. Parent = head,
  436. CFrame = head.CFrame,
  437. formFactor = "Symmetric",
  438. Size = Vector3.new(1, 1, 1),
  439. CanCollide = false,
  440. TopSurface = "Smooth",
  441. BottomSurface = "Smooth",
  442. Locked = true,
  443. BrickColor=BrickColor.new("Gold"),
  444. })
  445. local Weld = AddInstance("Weld",{
  446. Parent = Reaper3,
  447. Part0 = head,
  448. C0 = CFrame.new(0,.3,-0.02)*CFrame.Angles(-.1,0,0),
  449. Part1 = Reaper3,
  450. })
  451. local Mesh = AddInstance("SpecialMesh",{
  452. Parent = Reaper3,
  453. MeshId = "rbxassetid://19380122",
  454. TextureId = "rbxassetid://19380117",
  455. Scale = Vector3.new(0,0,0),
  456. VertexColor = Vector3.new(1,1,1),
  457. })
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465. local Reaper4 = AddInstance("Part",{
  466. Parent = RightArm,
  467. CFrame = RightArm.CFrame,
  468. formFactor = "Symmetric",
  469. Size = Vector3.new(0.1, 0.5, 3),
  470. CanCollide = false,
  471. TopSurface = "Smooth",
  472. BottomSurface = "Smooth",
  473. Locked = true,
  474. Transparency = 0
  475. })
  476. local Weld = AddInstance("Weld",{
  477. Parent = Reaper4,
  478. Part0 = RightArm,
  479. C0 = CFrame.new(-0.35,-1.8,-0.4)*CFrame.Angles(4.7,3.4,0),
  480. Part1 = Reaper4,
  481. })
  482. local Mesh = AddInstance("SpecialMesh",{
  483. Parent = Reaper4,
  484. MeshId = "rbxassetid://470533002",
  485. TextureId = "rbxassetid://470533004",
  486. Scale = Vector3.new(0,0,0),
  487. VertexColor = Vector3.new(1,1,1),
  488. })
  489.  
  490. local GunFire = AddInstance("Part",{
  491. Parent = RightArm,
  492. CFrame = RightArm.CFrame,
  493. formFactor = "Symmetric",
  494. Size = Vector3.new(0.1, 0.1, 0.1),
  495. CanCollide = false,
  496. TopSurface = "Smooth",
  497. BottomSurface = "Smooth",
  498. Locked = true,
  499. Transparency = 1
  500. })
  501. local Weld = AddInstance("Weld",{
  502. Parent = GunFire,
  503. Part0 = RightArm,
  504. C0 = CFrame.new(-0.8,-3.5,-0.7)*CFrame.Angles(4.7,3.4,0),
  505. Part1 = GunFire,
  506. })
  507.  
  508.  
  509. local GunParticle = Instance.new("ParticleEmitter", GunFire);
  510. GunParticle.VelocitySpread = 60;
  511. GunParticle.LightEmission = 200;
  512.  
  513. local Colors2 = {Color3.new(1,.5,0), Color3.new(1,.7,0), Color3.new(1,.9,0);}
  514. GunParticle.Size = NumberSequence.new(.05,.07);
  515.  
  516. GunParticle.Color = ColorSequence.new(Colors2[math.random(#Colors2)]);
  517. GunParticle.Texture = "rbxassetid://252350680";
  518. GunParticle.RotSpeed = NumberRange.new(10,70);
  519. GunParticle.Rate = 600;
  520. GunParticle.Speed = NumberRange.new(15);
  521. GunParticle.Transparency = NumberSequence.new(0,1);
  522. GunParticle.Lifetime = NumberRange.new(.01,.2);
  523. GunParticle.EmissionDirection = 'Back'
  524. GunParticle.Enabled = false
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533. local Reaper5 = AddInstance("Part",{
  534. Parent = RightArm,
  535. CFrame = RightArm.CFrame,
  536. formFactor = "Symmetric",
  537. Size = Vector3.new(0.1, 0.5, 3),
  538. CanCollide = false,
  539. TopSurface = "Smooth",
  540. BottomSurface = "Smooth",
  541. Locked = true,
  542. Transparency = 1
  543. })
  544. local Weld = AddInstance("Weld",{
  545. Parent = Reaper5,
  546. Part0 = RightArm,
  547. C0 = CFrame.new(-.1,-0.75,-.7)*CFrame.Angles(1.5,0,3),
  548. Part1 = Reaper5,
  549. })
  550. local Mesh = AddInstance("SpecialMesh",{
  551. Parent = Reaper5,
  552. MeshId = "rbxassetid://431003868",
  553. TextureId = "rbxassetid://430627740",
  554. Scale = Vector3.new(1.93,1.99,1.99),
  555. VertexColor = Vector3.new(1,1,1),
  556. })
  557.  
  558.  
  559.  
  560. local Arms = AddInstance("Model",{
  561. Parent = cam,
  562. Name = "Arms",
  563.  
  564.  
  565. })
  566.  
  567. local Arm1 = AddInstance("Part",{
  568. Parent = Arms,
  569. Name = "RightArm",
  570. CFrame = RightArm.CFrame,
  571. formFactor = "Symmetric",
  572. Size = Vector3.new(.85,1.85,.85),
  573. CanCollide = false,
  574. Material = "SmoothPlastic",
  575. TopSurface = "Smooth",
  576. BottomSurface = "Smooth",
  577. Locked = true,
  578. BrickColor=BrickColor.new("Pastel brown"),
  579. Transparency = 0
  580. })
  581. local Weld = AddInstance("Weld",{
  582. Parent = Arm1,
  583. Part0 = RightArm,
  584. C0 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0),
  585. Part1 = Arm1,
  586. })
  587.  
  588. local Arm2 = AddInstance("Part",{
  589. Parent = Arms,
  590. Name = "LeftArm",
  591. CFrame = LeftArm.CFrame,
  592. formFactor = "Symmetric",
  593. Size = Vector3.new(.85,1.85,.85),
  594. CanCollide = false,
  595. Material = "SmoothPlastic",
  596. TopSurface = "Smooth",
  597. BottomSurface = "Smooth",
  598. Locked = true,
  599. BrickColor=BrickColor.new("Pastel brown"),
  600. Transparency = 0
  601. })
  602. local Weld = AddInstance("Weld",{
  603. Parent = Arm2,
  604. Part0 = LeftArm,
  605. C0 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0),
  606. Part1 = Arm2,
  607. })
  608.  
  609.  
  610.  
  611.  
  612. local Arm3 = AddInstance("Part",{
  613. Parent = Arms,
  614. Name = "RightArm",
  615. CFrame = RightArm.CFrame,
  616. formFactor = "Symmetric",
  617. Size = Vector3.new(.9,.9,.9),
  618. CanCollide = false,
  619. Material = "SmoothPlastic",
  620. TopSurface = "Smooth",
  621. BottomSurface = "Smooth",
  622. Locked = true,
  623. BrickColor=TeamColor,
  624. Transparency = 0
  625. })
  626. local Weld = AddInstance("Weld",{
  627. Parent = Arm3,
  628. Part0 = RightArm,
  629. C0 = CFrame.new(0,.5,0)*CFrame.Angles(0,0,0),
  630. Part1 = Arm3,
  631. })
  632.  
  633. local Arm4 = AddInstance("Part",{
  634. Parent = Arms,
  635. Name = "LeftArm",
  636. CFrame = LeftArm.CFrame,
  637. formFactor = "Symmetric",
  638. Size = Vector3.new(.9,.9,.9),
  639. CanCollide = false,
  640. Material = "SmoothPlastic",
  641. TopSurface = "Smooth",
  642. BottomSurface = "Smooth",
  643. Locked = true,
  644. BrickColor=TeamColor,
  645. Transparency = 0
  646. })
  647. local Weld = AddInstance("Weld",{
  648. Parent = Arm4,
  649. Part0 = LeftArm,
  650. C0 = CFrame.new(0,.5,0)*CFrame.Angles(0,0,0),
  651. Part1 = Arm4,
  652. })
  653. local Arm5 = AddInstance("Part",{
  654. Parent = Arms,
  655. Name = "RightArm",
  656. CFrame = RightArm.CFrame,
  657. formFactor = "Symmetric",
  658. Size = Vector3.new(.86,.8,.86),
  659. CanCollide = false,
  660. Material = "SmoothPlastic",
  661. TopSurface = "Smooth",
  662. BottomSurface = "Smooth",
  663. Locked = true,
  664. BrickColor=BrickColor.new("Br. yellowish orange"),
  665. Transparency = 0
  666. })
  667. local Weld = AddInstance("Weld",{
  668. Parent = Arm5,
  669. Part0 = RightArm,
  670. C0 = CFrame.new(0,-.55,0)*CFrame.Angles(0,0,0),
  671. Part1 = Arm5,
  672. })
  673.  
  674. local Reaper6 = AddInstance("Part",{
  675. Parent = Arms,
  676. CFrame = RightArm.CFrame,
  677. formFactor = "Symmetric",
  678. Size = Vector3.new(0.1, 0.1, .1),
  679. CanCollide = false,
  680. TopSurface = "Smooth",
  681. BottomSurface = "Smooth",
  682. Locked = true,
  683. Transparency = 1
  684. })
  685. local Weld = AddInstance("Weld",{
  686. Parent = Reaper6,
  687. Part0 = RightArm,
  688. C0 = CFrame.new(-0.35,-1.8,-0.4)*CFrame.Angles(4.7,3.4,0),
  689. Part1 = Reaper6,
  690. })
  691. local Mesh = AddInstance("SpecialMesh",{
  692. Parent = Reaper6,
  693. MeshId = "rbxassetid://470533002",
  694. TextureId = "rbxassetid://470533004",
  695. Scale = Vector3.new(.029,.029,.029),
  696. VertexColor = Vector3.new(1,1,1),
  697. })
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711. local Reaper7 = AddInstance("Part",{
  712. Parent = Arms,
  713. CFrame = RightArm.CFrame,
  714. formFactor = "Symmetric",
  715. Size = Vector3.new(0.1, 0.5, 3),
  716. CanCollide = false,
  717. TopSurface = "Smooth",
  718. BottomSurface = "Smooth",
  719. Locked = true,
  720. Transparency = 1
  721. })
  722. local Weld = AddInstance("Weld",{
  723. Parent = Reaper7,
  724. Part0 = RightArm,
  725. C0 = CFrame.new(-.1,-0.75,-.7)*CFrame.Angles(1.5,0,3),
  726. Part1 = Reaper7,
  727. })
  728. local Mesh = AddInstance("SpecialMesh",{
  729. Parent = Reaper7,
  730. MeshId = "rbxassetid://431003868",
  731. TextureId = "rbxassetid://430627740",
  732. Scale = Vector3.new(0,0,0),
  733. VertexColor = Vector3.new(1,1,1),
  734. })
  735.  
  736.  
  737. local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  738. Humanoid.Animator:Destroy()
  739. Character.Animate:Destroy()
  740.  
  741. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  742. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  743. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  744.  
  745.  
  746. RSH, LSH = nil, nil
  747.  
  748. RW = Instance.new("Weld")
  749. LW = Instance.new("Weld")
  750.  
  751. RH = Torso["Right Hip"]
  752. LH = Torso["Left Hip"]
  753.  
  754. RSH = Torso["Right Shoulder"]
  755. LSH = Torso["Left Shoulder"]
  756.  
  757. RSH.Parent = nil
  758. LSH.Parent = nil
  759.  
  760. RW.Name = "RW"
  761. RW.Part0 = Torso
  762. RW.C0 = cn(1.5, 0.5, 0)
  763. RW.C1 = cn(0, 0.5, 0)
  764. RW.Part1 = RightArm
  765. RW.Parent = Torso
  766.  
  767. LW.Name = "LW"
  768. LW.Part0 = Torso
  769. LW.C0 = cn(-1.5, 0.5, 0)
  770. LW.C1 = cn(0, 0.5, 0)
  771. LW.Part1 = LeftArm
  772. LW.Parent = Torso
  773.  
  774. function clerp(a, b, t)
  775. local qa = {
  776. QuaternionFromCFrame(a)
  777. }
  778. local qb = {
  779. QuaternionFromCFrame(b)
  780. }
  781. local ax, ay, az = a.x, a.y, a.z
  782. local bx, by, bz = b.x, b.y, b.z
  783. local _t = 1 - t
  784. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  785. end
  786.  
  787. function QuaternionFromCFrame(cf)
  788. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  789. local trace = m00 + m11 + m22
  790. if trace > 0 then
  791. local s = math.sqrt(1 + trace)
  792. local recip = 0.5 / s
  793. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  794. else
  795. local i = 0
  796. if m11 > m00 then
  797. i = 1
  798. end
  799. if m22 > (i == 0 and m00 or m11) then
  800. i = 2
  801. end
  802. if i == 0 then
  803. local s = math.sqrt(m00 - m11 - m22 + 1)
  804. local recip = 0.5 / s
  805. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  806. elseif i == 1 then
  807. local s = math.sqrt(m11 - m22 - m00 + 1)
  808. local recip = 0.5 / s
  809. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  810. elseif i == 2 then
  811. local s = math.sqrt(m22 - m00 - m11 + 1)
  812. local recip = 0.5 / s
  813. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  814. end
  815. end
  816. end
  817.  
  818. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  819. local xs, ys, zs = x + x, y + y, z + z
  820. local wx, wy, wz = w * xs, w * ys, w * zs
  821. local xx = x * xs
  822. local xy = x * ys
  823. local xz = x * zs
  824. local yy = y * ys
  825. local yz = y * zs
  826. local zz = z * zs
  827. return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  828. end
  829.  
  830. function QuaternionSlerp(a, b, t)
  831. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  832. local startInterp, finishInterp;
  833. if cosTheta >= 0.0001 then
  834. if (1 - cosTheta) > 0.0001 then
  835. local theta = math.acos(cosTheta)
  836. local invSinTheta = 1 / math.sin(theta)
  837. startInterp = math.sin((1 - t) * theta) * invSinTheta
  838. finishInterp = math.sin(t * theta) * invSinTheta
  839. else
  840. startInterp = 1 - t
  841. finishInterp = t
  842. end
  843. else
  844. if (1 + cosTheta) > 0.0001 then
  845. local theta = math.acos(-cosTheta)
  846. local invSinTheta = 1 / math.sin(theta)
  847. startInterp = math.sin((t - 1) * theta) * invSinTheta
  848. finishInterp = math.sin(t * theta) * invSinTheta
  849. else
  850. startInterp = t - 1
  851. finishInterp = t
  852. end
  853. end
  854. return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  855. end
  856.  
  857. function swait(num)
  858. if num == 0 or num == nil then
  859. game:service'RunService'.RenderStepped:wait(0)
  860. else
  861. for i = 0, num do
  862. game:service'RunService'.RenderStepped:wait(0)
  863. end
  864. end
  865. end
  866.  
  867. local RbxUtility = LoadLibrary("RbxUtility")
  868. local Create = RbxUtility.Create
  869.  
  870. function RemoveOutlines(part)
  871. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  872. end
  873.  
  874. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  875. local Part = Create("Part"){
  876. formFactor = FormFactor,
  877. Parent = Parent,
  878. Reflectance = Reflectance,
  879. Transparency = Transparency,
  880. CanCollide = false,
  881. Locked = true,
  882. BrickColor = BrickColor.new(tostring(BColor)),
  883. Name = Name,
  884. Size = Size,
  885. Material = Material,
  886. }
  887. RemoveOutlines(Part)
  888. return Part
  889. end
  890.  
  891. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  892. local Msh = Create(Mesh){
  893. Parent = Part,
  894. Offset = OffSet,
  895. Scale = Scale,
  896. }
  897. if Mesh == "SpecialMesh" then
  898. Msh.MeshType = MeshType
  899. Msh.MeshId = MeshId
  900. end
  901. return Msh
  902. end
  903.  
  904. function CreateWeld(Parent, Part0, Part1, C0, C1)
  905. local Weld = Create("Weld"){
  906. Parent = Parent,
  907. Part0 = Part0,
  908. Part1 = Part1,
  909. C0 = C0,
  910. C1 = C1,
  911. }
  912. return Weld
  913. end
  914.  
  915. function rayCast(Position, Direction, Range, Ignore)
  916. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  917. end
  918.  
  919. function CreateSound(id, par, vol, pit)
  920. coroutine.resume(coroutine.create(function()
  921. local sou = Instance.new("Sound", par or workspace)
  922. sou.Volume = vol
  923. sou.Pitch = pit or 1
  924. sou.SoundId = id
  925. wait()
  926. sou:play()
  927. game:GetService("Debris"):AddItem(sou, 6)
  928. end))
  929. end
  930.  
  931. local function getclosest(obj, distance)
  932. local last, lastx = distance + 1
  933. for i, v in pairs(workspace:GetChildren()) do
  934. if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
  935. local t = v.Torso
  936. local dist = (t.Position - obj.Position).magnitude
  937. if dist <= distance then
  938. if dist < last then
  939. last = dist
  940. lastx = v
  941. end
  942. end
  943. end
  944. end
  945. return lastx
  946. end
  947.  
  948. function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch)
  949. for i, v in pairs(hit:GetChildren()) do
  950. if v:IsA("Humanoid") and hit.Name ~= Character.Name then
  951. local find = v:FindFirstChild("Hitz")
  952. if not find then
  953. if v.Parent:findFirstChild("Head") then
  954. local BillG = Create("BillboardGui"){
  955. Parent = v.Parent.Head,
  956. Size = UDim2.new(1, 0, 1, 0),
  957. Adornee = v.Parent.Head,
  958. StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)),
  959. }
  960. local TL = Create("TextLabel"){
  961. Parent = BillG,
  962. Size = UDim2.new(3, 3, 3, 3),
  963. BackgroundTransparency = 1,
  964. Text = tostring(damage).."-",
  965. TextColor3 = Color1.Color,
  966. TextStrokeColor3 = Color2.Color,
  967. TextStrokeTransparency = 0,
  968. TextXAlignment = Enum.TextXAlignment.Center,
  969. TextYAlignment = Enum.TextYAlignment.Center,
  970. FontSize = Enum.FontSize.Size18,
  971. Font = "ArialBold",
  972. }
  973. coroutine.resume(coroutine.create(function()
  974. wait(1)
  975. for i = 0, 1, .1 do
  976. wait(.1)
  977. BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0)
  978. end
  979. BillG:Destroy()
  980. end))
  981. end
  982. v.Health = v.Health - damage
  983. local bool = Create("BoolValue"){
  984. Parent = v,
  985. Name = 'Hitz',
  986. }
  987. if HSound ~= nil and HPitch ~= nil then
  988. CreateSound(HSound, hit, 1, HPitch)
  989. end
  990. game:GetService("Debris"):AddItem(bool, cooldown)
  991. end
  992. end
  993. end
  994. end
  995.  
  996.  
  997. function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  998. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  999. prt.Anchored = true
  1000. prt.CFrame = cframe
  1001. local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1002. game:GetService("Debris"):AddItem(prt, 10)
  1003. if Type == 1 or Type == nil then
  1004. table.insert(Effects, {
  1005. prt,
  1006. "Block1",
  1007. delay,
  1008. x3,
  1009. y3,
  1010. z3,
  1011. msh
  1012. })
  1013. elseif Type == 2 then
  1014. table.insert(Effects, {
  1015. prt,
  1016. "Block2",
  1017. delay,
  1018. x3,
  1019. y3,
  1020. z3,
  1021. msh
  1022. })
  1023. end
  1024. end
  1025.  
  1026. function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1027. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  1028. prt.Anchored = true
  1029. prt.CFrame = cframe
  1030. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1031. game:GetService("Debris"):AddItem(prt, 10)
  1032. table.insert(Effects, {
  1033. prt,
  1034. "Cylinder",
  1035. delay,
  1036. x3,
  1037. y3,
  1038. z3,
  1039. msh
  1040. })
  1041. end
  1042.  
  1043. function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1044. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  1045. prt.Anchored = true
  1046. prt.CFrame = cframe * CFrame.new(x1, y1, z1)
  1047. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1048. game:GetService("Debris"):AddItem(prt, 10)
  1049. table.insert(Effects, {
  1050. prt,
  1051. "Cylinder",
  1052. delay,
  1053. x3,
  1054. y3,
  1055. z3,
  1056. msh
  1057. })
  1058. end
  1059.  
  1060. function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1061. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  1062. prt.Anchored = true
  1063. prt.CFrame = cframe
  1064. local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1065. game:GetService("Debris"):AddItem(prt, 10)
  1066. table.insert(Effects, {
  1067. prt,
  1068. "Cylinder",
  1069. delay,
  1070. x3,
  1071. y3,
  1072. z3,
  1073. msh
  1074. })
  1075. end
  1076.  
  1077. function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1078. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  1079. prt.Anchored = true
  1080. prt.CFrame = cframe
  1081. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1082. game:GetService("Debris"):AddItem(prt, 10)
  1083. table.insert(Effects, {
  1084. prt,
  1085. "Cylinder",
  1086. delay,
  1087. x3,
  1088. y3,
  1089. z3,
  1090. msh
  1091. })
  1092. end
  1093.  
  1094. function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1095. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  1096. prt.Anchored = true
  1097. prt.CFrame = cframe
  1098. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1099. game:GetService("Debris"):AddItem(prt, 10)
  1100. table.insert(Effects, {
  1101. prt,
  1102. "Cylinder",
  1103. delay,
  1104. x3,
  1105. y3,
  1106. z3,
  1107. msh
  1108. })
  1109. end
  1110.  
  1111. function BreakEffect(brickcolor, cframe, x1, y1, z1)
  1112. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  1113. prt.Anchored = true
  1114. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1115. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  1116. local num = math.random(10, 50) / 1000
  1117. game:GetService("Debris"):AddItem(prt, 10)
  1118. table.insert(Effects, {
  1119. prt,
  1120. "Shatter",
  1121. num,
  1122. prt.CFrame,
  1123. math.random() - math.random(),
  1124. 0,
  1125. math.random(50, 100) / 100
  1126. })
  1127. end
  1128.  
  1129.  
  1130.  
  1131.  
  1132. for i = 0, 1, 0.05 do
  1133. swait()
  1134. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  1135. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
  1136. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1)
  1137. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(-10)), 0.3)
  1138. if Torsovelocity > 2 then
  1139. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-50 * math.cos(sine / 4)), math.rad(0), math.rad(4 * math.cos(sine / 4))), .2)
  1140. RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
  1141. LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
  1142. elseif Torsovelocity < 1 then
  1143. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(0), math.rad(5)), 0.1)
  1144. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  1145. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  1146. end
  1147. end
  1148. attack = false
  1149.  
  1150.  
  1151.  
  1152. game:GetService'RunService'.Stepped:connect(function()
  1153.  
  1154.  
  1155.  
  1156. if Wep == 1 then
  1157. equippedgun2 = false
  1158. Reaper4.Transparency = 1
  1159. Reaper5.Transparency = 0
  1160. Reaper6.Transparency = 1
  1161. Reaper7.Transparency = 0
  1162. end
  1163. if Wep == 2 then
  1164. equippedgun2 = true
  1165. Reaper4.Transparency = 0
  1166. Reaper5.Transparency = 1
  1167. Reaper6.Transparency = 0
  1168. Reaper7.Transparency = 1
  1169. end
  1170. if Wep == 3 then
  1171. equippedgun2 = false
  1172. Reaper4.Transparency = 1
  1173. Reaper5.Transparency = 1
  1174. Reaper6.Transparency = 1
  1175. Reaper7.Transparency = 1
  1176. end
  1177.  
  1178. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  1179. velocity = RootPart.Velocity.y
  1180. sine = sine + change
  1181. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  1182. if equipped == true or equipped == false then
  1183. if RootPart.Velocity.y > 1 and hit == nil then
  1184. Anim = "Jump"
  1185. if attack == false and Wep == 1 then
  1186. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  1187. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1188. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(30)), .1)
  1189. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(-30)), .1)
  1190. RH.C0 = clerp(RH.C0, cn(1, -.9, -.3) * RHCF * angles(math.rad(3), math.rad(0), math.rad(0)), .1)
  1191. LH.C0 = clerp(LH.C0, cn(-1, -.7, -.5) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(0)), .1)
  1192. end
  1193. elseif RootPart.Velocity.y < -1 and hit == nil then
  1194. Anim = "Fall"
  1195. if attack == false and Wep == 1 then
  1196. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1197. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1198. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), .1)
  1199. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-50)), .1)
  1200. RH.C0 = clerp(RH.C0, cn(1, -1, -.3) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  1201. LH.C0 = clerp(LH.C0, cn(-1, -.8, -.3) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  1202. end
  1203. elseif Torsovelocity < 1 and hit ~= nil then
  1204. Anim = "Idle"
  1205. if attack == false and Wep == 1 then
  1206. change = 1
  1207. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.1 + 0.1 * math.cos(sine / 25)) * angles(math.rad(0), math.rad(0), math.rad(5)), .1)
  1208. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .1)
  1209. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5 - -.1 * math.cos(sine / 25), 0) * angles(math.rad(50), math.rad(35 - 25 * math.cos(sine / 25)), math.rad(5 + 3 * math.cos(sine / 25))), 0.1)
  1210. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(80 + 7 * math.cos(sine / 25)), math.rad(-30), math.rad(35 - 1 * math.cos(sine / 25))), 0.1)
  1211. RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.1 * math.cos(sine / 25), 0) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
  1212. LH.C0 = clerp(LH.C0, cn(-1, -.9 - 0.1 * math.cos(sine / 25), 0) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
  1213. end
  1214. elseif Torsovelocity > 2 and hit ~= nil then
  1215. Anim = "Walk"
  1216. if attack == false and Wep == 1 then
  1217. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(5 * math.cos(sine / 5))), .2)
  1218. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(-5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
  1219. RW.C0 = clerp(RW.C0, CFrame.new(1.2 - -.05 * math.cos(sine / 4), 0.5 - -.05 * math.cos(sine / 4), 0) * angles(math.rad(50), math.rad(57 - .1 * math.cos(sine / 25)), math.rad(5 + 3 * math.cos(sine / 25))), 0.1)
  1220. LW.C0 = clerp(LW.C0, CFrame.new(-1.2 - -.05 * math.cos(sine / 4), 0.4 - -.05 * math.cos(sine / 4), -.4) * angles(math.rad(80 + 1 * math.cos(sine / 25)), math.rad(-30), math.rad(35 - 1 * math.cos(sine / 25))), 0.1)
  1221. RH.C0 = clerp(RH.C0, cn(1, -.9 + -.1 * math.cos(sine / 4),0 + -.1 * math.cos(sine / 4)) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
  1222. LH.C0 = clerp(LH.C0, cn(-1, -.9 + .1 * math.cos(sine / 4), 0 + .1 * math.cos(sine / 4)) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
  1223. end
  1224. end
  1225. end
  1226. -----------------------[Anim2]--------------------------------------------------------------------------------------------------------------------------
  1227.  
  1228. if equipped == true or equipped == false then
  1229. if RootPart.Velocity.y > 1 and hit == nil then
  1230. Anim = "Jump"
  1231. if attack == false and Wep == 2 then
  1232. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  1233. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1234. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.2, 0) * angles(math.rad(60), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1)
  1235. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.1, -.4) * angles(math.rad(55 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1)
  1236. RH.C0 = clerp(RH.C0, cn(1, -.9, -.3) * RHCF * angles(math.rad(3), math.rad(0), math.rad(0)), .1)
  1237. LH.C0 = clerp(LH.C0, cn(-1, -.7, -.5) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(0)), .1)
  1238. end
  1239.  
  1240. elseif RootPart.Velocity.y < -1 and hit == nil then
  1241. Anim = "Fall"
  1242. if attack == false and Wep == 2 then
  1243. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1244. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1245. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.8, 0) * angles(math.rad(60), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.05)
  1246. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.7, -.4) * angles(math.rad(55 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.05)
  1247. RH.C0 = clerp(RH.C0, cn(1, -1, -.3) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  1248. LH.C0 = clerp(LH.C0, cn(-1, -.8, -.3) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  1249. end
  1250. elseif Torsovelocity < 1 and hit ~= nil then
  1251. Anim = "Idle"
  1252. if attack == false and Wep == 2 then
  1253. change = 1
  1254. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.1 + 0.1 * math.cos(sine / 25)) * angles(math.rad(0), math.rad(0), math.rad(5)), .1)
  1255. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .1)
  1256. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(60), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1)
  1257. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(55 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1)
  1258. RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.1 * math.cos(sine / 25), 0) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
  1259. LH.C0 = clerp(LH.C0, cn(-1, -.9 - 0.1 * math.cos(sine / 25), 0) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
  1260. end
  1261. elseif Torsovelocity > 2 and hit ~= nil then
  1262. Anim = "Walk"
  1263. if attack == false and Wep == 2 then
  1264. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-25 - 5 * math.cos(sine / 5))), .2)
  1265. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(25 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
  1266. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(60), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1)
  1267. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(55 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1)
  1268. RH.C0 = clerp(RH.C0, cn(.95, -.9 + -.1 * math.cos(sine / 4),-.35) * RHCF * angles(math.rad(-2), math.rad(25), math.rad(50 * math.cos(sine / 4))), .3)
  1269. LH.C0 = clerp(LH.C0, cn(-.95, -.9 + .1 * math.cos(sine / 4), .35) * LHCF * angles(math.rad(-2), math.rad(25), math.rad(50 * math.cos(sine / 4))), .3)
  1270. end
  1271.  
  1272. end
  1273. end
  1274.  
  1275.  
  1276.  
  1277. -----------------------[Noraml Anim]--------------------------------------------------------------------------------------------------------------------------
  1278.  
  1279. if equipped == true or equipped == false then
  1280. if RootPart.Velocity.y > 1 and hit == nil then
  1281. Anim = "Jump"
  1282. if attack == false and Wep == 3 then
  1283. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  1284. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1285. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(30)), .1)
  1286. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(-30)), .1)
  1287. RH.C0 = clerp(RH.C0, cn(1, -.9, -.3) * RHCF * angles(math.rad(3), math.rad(0), math.rad(0)), .1)
  1288. LH.C0 = clerp(LH.C0, cn(-1, -.7, -.5) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(0)), .1)
  1289. end
  1290. elseif RootPart.Velocity.y < -1 and hit == nil then
  1291. Anim = "Fall"
  1292. if attack == false and Wep == 3 then
  1293. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1294. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  1295. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(50)), .1)
  1296. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-50)), .1)
  1297. RH.C0 = clerp(RH.C0, cn(1, -1, -.3) * RHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  1298. LH.C0 = clerp(LH.C0, cn(-1, -.8, -.3) * LHCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  1299. end
  1300. elseif Torsovelocity < 1 and hit ~= nil then
  1301. Anim = "Idle"
  1302. if attack == false and Wep == 3 then
  1303. change = 1
  1304. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.1 + 0.1 * math.cos(sine / 25)) * angles(math.rad(0), math.rad(0), math.rad(5)), .1)
  1305. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 25)), math.rad(0), math.rad(-5)), .1)
  1306. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5 - 0 * math.cos(sine / 25), 0) * angles(math.rad(0), math.rad(0 - 0 * math.cos(sine / 25)), math.rad(5 + 3 * math.cos(sine / 25))), 0.1)
  1307. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0 + 0 * math.cos(sine / 25)), math.rad(-0), math.rad(-5 - 3 * math.cos(sine / 25))), 0.1)
  1308. RH.C0 = clerp(RH.C0, cn(1, -.9 - 0.1 * math.cos(sine / 25), 0) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
  1309. LH.C0 = clerp(LH.C0, cn(-1, -.9 - 0.1 * math.cos(sine / 25), 0) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(-5), math.rad(0 + 2 * math.cos(sine / 25))), .1)
  1310. end
  1311. elseif Torsovelocity > 2 and hit ~= nil then
  1312. Anim = "Walk"
  1313. if attack == false and Wep == 3 then
  1314. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(5 * math.cos(sine / 5))), .2)
  1315. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(-5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
  1316. RW.C0 = clerp(RW.C0, CFrame.new(1.5 - -0 * math.cos(sine / 4), 0.5 - -.05 * math.cos(sine / 4), 0) * angles(math.rad(10 + -50 * math.cos(sine / 4)), math.rad(0 - .1 * math.cos(sine / 25)), math.rad(5 + 3 * math.cos(sine / 25))), 0.3)
  1317. LW.C0 = clerp(LW.C0, CFrame.new(-1.5 - -0 * math.cos(sine / 4), 0.5 - -.05 * math.cos(sine / 4), 0) * angles(math.rad(10 + 50 * math.cos(sine / 4)), math.rad(-0), math.rad(-5 - 3 * math.cos(sine / 25))), 0.3)
  1318. RH.C0 = clerp(RH.C0, cn(1, -.9 + -.1 * math.cos(sine / 4),0 + -.1 * math.cos(sine / 4)) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
  1319. LH.C0 = clerp(LH.C0, cn(-1, -.9 + .1 * math.cos(sine / 4), 0 + .1 * math.cos(sine / 4)) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
  1320. end
  1321. end
  1322. end
  1323.  
  1324.  
  1325.  
  1326.  
  1327.  
  1328.  
  1329.  
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341. if #Effects > 0 then
  1342. for e = 1, #Effects do
  1343. if Effects[e] ~= nil then
  1344. local Thing = Effects[e]
  1345. if Thing ~= nil then
  1346. local Part = Thing[1]
  1347. local Mode = Thing[2]
  1348. local Delay = Thing[3]
  1349. local IncX = Thing[4]
  1350. local IncY = Thing[5]
  1351. local IncZ = Thing[6]
  1352. if Thing[1].Transparency <= 1 then
  1353. if Thing[2] == "Block1" then
  1354. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1355. local Mesh = Thing[1].Mesh
  1356. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1357. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1358. elseif Thing[2] == "Block2" then
  1359. Thing[1].CFrame = Thing[1].CFrame
  1360. local Mesh = Thing[7]
  1361. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1362. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1363. elseif Thing[2] == "Cylinder" then
  1364. local Mesh = Thing[1].Mesh
  1365. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1366. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1367. elseif Thing[2] == "Blood" then
  1368. local Mesh = Thing[7]
  1369. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0)
  1370. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1371. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1372. elseif Thing[2] == "Elec" then
  1373. local Mesh = Thing[1].Mesh
  1374. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1375. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1376. elseif Thing[2] == "Disappear" then
  1377. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1378. elseif Thing[2] == "Shatter" then
  1379. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1380. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  1381. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  1382. Thing[6] = Thing[6] + Thing[5]
  1383. end
  1384. else
  1385. Part.Parent = nil
  1386. table.remove(Effects, e)
  1387. end
  1388. end
  1389. end
  1390. end
  1391. end
  1392. end)
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406. local No = Instance.new("Sound", head);
  1407. No.SoundId = "rbxassetid://245064504"
  1408. No.Volume = 3
  1409. local yes = Instance.new("Sound", head);
  1410. yes.SoundId = "rbxassetid://131384028"
  1411. yes.Volume = 3
  1412. local HitM = Instance.new("Sound", Reaper5);
  1413. HitM.SoundId = "rbxassetid://"..WSH
  1414. HitM.Volume = 1.1
  1415. local Swing = Instance.new("Sound", Reaper5);
  1416. Swing.SoundId = "rbxassetid://10209850"
  1417. Swing.Volume = 1.5
  1418. Swing.Pitch = 1.1
  1419. local SwingH = Instance.new("Sound", Reaper5);
  1420. SwingH.SoundId = "rbxassetid://10209590"
  1421. SwingH.Volume = 2.9
  1422. SwingH.Pitch = .8
  1423. local Taunt = Instance.new("Sound", head);
  1424. Taunt.SoundId = "rbxassetid://150611842"
  1425. Taunt.Volume = 2
  1426. local RUS = Instance.new("Sound", char);
  1427. RUS.SoundId = "rbxassetid://322621962"
  1428. RUS.Volume = 2.5
  1429. RUS.Pitch = 1
  1430. RUS.Looped = true
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441. function BuildSentry()
  1442. do --CFrame lerp (stravant, clerp by AntiBoomz0r)
  1443. local function QuaternionFromCFrame(cf) -- y u no axis angle interpolation?
  1444. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  1445. local trace = m00 + m11 + m22
  1446. if trace > 0 then
  1447. local s = math.sqrt(1 + trace)
  1448. local recip = 0.5/s
  1449. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  1450. else
  1451. local i = 0
  1452. if m11 > m00 then
  1453. i = 1
  1454. end
  1455. if m22 > (i == 0 and m00 or m11) then
  1456. i = 2
  1457. end
  1458. if i == 0 then
  1459. local s = math.sqrt(m00-m11-m22+1)
  1460. local recip = 0.5/s
  1461. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  1462. elseif i == 1 then
  1463. local s = math.sqrt(m11-m22-m00+1)
  1464. local recip = 0.5/s
  1465. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  1466. elseif i == 2 then
  1467. local s = math.sqrt(m22-m00-m11+1)
  1468. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  1469. end
  1470. end
  1471. end
  1472. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  1473. local xs, ys, zs = x + x, y + y, z + z
  1474. local wx, wy, wz = w*xs, w*ys, w*zs
  1475. local xx = x*xs
  1476. local xy = x*ys
  1477. local xz = x*zs
  1478. local yy = y*ys
  1479. local yz = y*zs
  1480. local zz = z*zs
  1481. return CFrame.new(px, py, pz,1-(yy+zz), xy - wz, xz + wy,xy + wz, 1-(xx+zz), yz - wx, xz - wy, yz + wx, 1-(xx+yy))
  1482. end
  1483. function QuaternionSlerp(a, b, t)
  1484. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  1485. local startInterp, finishInterp;
  1486. if cosTheta >= 0.0001 then
  1487. if (1 - cosTheta) > 0.0001 then
  1488. local theta = math.acos(cosTheta)
  1489. local invSinTheta = 1/math.sin(theta)
  1490. startInterp = math.sin((1-t)*theta)*invSinTheta
  1491. finishInterp = math.sin(t*theta)*invSinTheta
  1492. else
  1493. startInterp = 1-t
  1494. finishInterp = t
  1495. end
  1496. else
  1497. if (1+cosTheta) > 0.0001 then
  1498. local theta = math.acos(-cosTheta)
  1499. local invSinTheta = 1/math.sin(theta)
  1500. startInterp = math.sin((t-1)*theta)*invSinTheta
  1501. finishInterp = math.sin(t*theta)*invSinTheta
  1502. else
  1503. startInterp = t-1
  1504. finishInterp = t
  1505. end
  1506. end
  1507. return a[1]*startInterp + b[1]*finishInterp, a[2]*startInterp + b[2]*finishInterp, a[3]*startInterp + b[3]*finishInterp, a[4]*startInterp + b[4]*finishInterp
  1508. end
  1509. function clerp(a,b,t)
  1510. local qa = {QuaternionFromCFrame(a)}
  1511. local qb = {QuaternionFromCFrame(b)}
  1512. local ax, ay, az = a.x, a.y, a.z
  1513. local bx, by, bz = b.x, b.y, b.z
  1514. local _t = 1-t
  1515. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  1516. end
  1517. end
  1518.  
  1519.  
  1520.  
  1521.  
  1522. local ABS = math.abs;
  1523. local SIN = math.sin;
  1524. local ASIN = math.asin;
  1525. local COS = math.cos;
  1526.  
  1527. local new = Instance.new;
  1528.  
  1529. function math_pos(float)
  1530. if float < 0 then float = 0 end
  1531. return float
  1532. end
  1533. function math_neg(float)
  1534. if float > 0 then float = 0 end
  1535. return float
  1536. end
  1537. function math_max(float, max)
  1538. if float > max then float = max end
  1539. return float
  1540. end
  1541. function math_min(float, min)
  1542. if float > min then float = min end
  1543. return float
  1544. end
  1545.  
  1546. function SharpSin(double_p1)
  1547. return ASIN(SIN(double_p1));
  1548. end
  1549.  
  1550. local Storage = Instance.new("Model", script);
  1551.  
  1552. function WeldP(part0, part1, C0, C1)
  1553. local W = new("Weld", Storage);
  1554. W.Part0 = part0;
  1555. W.Part1 = part1;
  1556. W.C0 = C0 or CFrame.new();
  1557. W.C1 = C1 or CFrame.new();
  1558. return W;
  1559. end
  1560.  
  1561. function Bevel(part, sizeV3)
  1562. local BvlMesh = new("SpecialMesh", part)
  1563. BvlMesh.MeshId = "rbxasset://fonts/torso.mesh";
  1564. if (sizeV3 ~= nil) then
  1565. BvlMesh.Scale = Vector3.new(sizeV3.x/2, sizeV3.y/2, sizeV3.z);
  1566. else
  1567. BvlMesh.Scale = Vector3.new(part.Size.x/2, part.Size.y/2, part.Size.z);
  1568. end
  1569. end
  1570.  
  1571.  
  1572.  
  1573. local Scale = 0.5 -- 1 is size of a robloxian (mostly);
  1574.  
  1575. Storage.Name = "ä";
  1576.  
  1577. local BasePart = new("Part");
  1578. BasePart.FormFactor = "Custom";
  1579. BasePart.TopSurface = 10;
  1580. BasePart.BottomSurface = 10;
  1581. BasePart.LeftSurface = 10;
  1582. BasePart.RightSurface = 10;
  1583. BasePart.FrontSurface = 10;
  1584. BasePart.BackSurface = 10;
  1585.  
  1586. local CylPart = new("Part");
  1587. CylPart.FormFactor = "Custom";
  1588. CylPart.TopSurface = 10;
  1589. CylPart.BottomSurface = 10;
  1590. CylPart.LeftSurface = 10;
  1591. CylPart.RightSurface = 10;
  1592. CylPart.FrontSurface = 10;
  1593. CylPart.BackSurface = 10;
  1594. new("CylinderMesh", CylPart);
  1595.  
  1596. local TopFrame = BasePart:clone()
  1597. TopFrame.Parent = Storage;
  1598. TopFrame.Size = Vector3.new(3.5*Scale, 1.5*Scale, 3.5*Scale);
  1599. TopFrame.BrickColor = TeamColor;
  1600.  
  1601. new("CylinderMesh", TopFrame);
  1602.  
  1603. local Screw = CylPart:clone();
  1604. Screw.Parent = Storage;
  1605. Screw.Size = Vector3.new(.3*Scale, 1.6*Scale, .3*Scale);
  1606. Screw.BrickColor = BrickColor.new(199);
  1607.  
  1608. local CGreyStyle = CylPart:clone()
  1609. CGreyStyle.Parent = Storage;
  1610. CGreyStyle.Size = Vector3.new(2.2*Scale, 1.52*Scale, 2.6*Scale);
  1611. CGreyStyle.BrickColor = BrickColor.new(199);
  1612.  
  1613. local TurretCasing = BasePart:clone();
  1614. TurretCasing.Size = Vector3.new(2.2*Scale, 1.4*Scale, 5.6*Scale);
  1615. TurretCasing.BrickColor = BrickColor.new(199);
  1616. TurretCasing.Parent = Storage;
  1617.  
  1618. Bevel(TurretCasing);
  1619.  
  1620. local TurretFront = BasePart:clone();
  1621. TurretFront.Size = Vector3.new(1.7*Scale, 1*Scale, .2*Scale);
  1622. TurretFront.BrickColor = TeamColor;
  1623. TurretFront.Parent = Storage;
  1624.  
  1625. local Barrel = CylPart:clone();
  1626. Barrel.Parent = Storage;
  1627. Barrel.Size = Vector3.new(.7*Scale, .4*Scale, .7*Scale);
  1628. Barrel.BrickColor = BrickColor.Black();
  1629.  
  1630.  
  1631. local Particle = Instance.new("ParticleEmitter", Barrel);
  1632. Particle.VelocitySpread = 30;
  1633. Particle.LightEmission = 200;
  1634.  
  1635. local Colors = {Color3.new(1,.5,0), Color3.new(1,.7,0), Color3.new(1,.9,0);}
  1636.  
  1637. Particle.Size = NumberSequence.new(.05,.07);
  1638.  
  1639. Particle.Color = ColorSequence.new(Colors[math.random(#Colors)]);
  1640. Particle.Texture = "rbxassetid://252350680";
  1641. Particle.RotSpeed = NumberRange.new(10,70);
  1642. Particle.Rate = 300;
  1643. Particle.Speed = NumberRange.new(15);
  1644. Particle.Transparency = NumberSequence.new(0,1);
  1645. Particle.Lifetime = NumberRange.new(.01,.2);
  1646. Particle.Enabled = false
  1647.  
  1648.  
  1649.  
  1650. local RedDot = BasePart:clone();
  1651. RedDot.Parent = Storage;
  1652. RedDot.Size = Vector3.new(.2*Scale, .2*Scale, .2*Scale);
  1653. RedDot.BrickColor = BrickColor.new("Really red");
  1654.  
  1655. local Sphere = Instance.new("SpecialMesh", RedDot);
  1656. Sphere.MeshType = "Sphere";
  1657. Sphere.Scale = Vector3.new(1*Scale,1*Scale,1*Scale);
  1658.  
  1659.  
  1660. Bevel(TurretFront, Vector3.new(1.7*Scale, 1*Scale, .05*Scale));
  1661.  
  1662. local Joint = CylPart:clone();
  1663. Joint.Parent = Storage;
  1664. Joint.Size = Vector3.new(.7*Scale, 2*Scale, .7*Scale);
  1665. Joint.BrickColor = BrickColor.Black();
  1666.  
  1667. local Hold = BasePart:clone();
  1668. Hold.Parent = Storage;
  1669. Hold.BrickColor = BrickColor.Black();
  1670. Hold.Size = Vector3.new(2.2*Scale, .2*Scale, .75*Scale);
  1671.  
  1672. local Bolt = BasePart:clone();
  1673. Bolt.Size = Vector3.new(.2*Scale, 1.5*Scale, .5*Scale);
  1674. Bolt.Parent = Storage;
  1675. Bolt.BrickColor = BrickColor.Black();
  1676.  
  1677. local Bolt2 = BasePart:clone();
  1678. Bolt2.Size = Vector3.new(.2*Scale, 1.5*Scale, .5*Scale);
  1679. Bolt2.Parent = Storage;
  1680. Bolt2.BrickColor = BrickColor.Black();
  1681.  
  1682.  
  1683. local TurretToFrame = WeldP(TopFrame, TurretCasing, CFrame.new(0, 0, 1.4*Scale));
  1684. WeldP(TopFrame, CGreyStyle);
  1685. WeldP(TurretCasing, TurretFront, CFrame.new(0, 0, 2.8*Scale));
  1686. WeldP(TopFrame, Screw);
  1687. local BarrelWeld = WeldP(Barrel, TurretFront, CFrame.new(.3*Scale, -.2*Scale, 0), CFrame.Angles(math.pi/2, 0, 0));
  1688.  
  1689. WeldP(RedDot, TurretFront, CFrame.new(-.55*Scale, 0, -.15*Scale), CFrame.Angles(math.pi/2, 0, 0));
  1690.  
  1691. local RotateAxisY = WeldP(Bolt, TurretCasing, CFrame.Angles(0,0,0), CFrame.new(1.1*Scale, -.75*Scale, 1*Scale));
  1692.  
  1693. WeldP(Bolt, Hold, CFrame.new(-1.1*Scale, -.5*Scale, 0));
  1694.  
  1695. WeldP(Bolt2, Hold, CFrame.new(1.1*Scale, -.5*Scale, 0));
  1696.  
  1697. local RotateAxisX = WeldP(Hold, Joint, CFrame.new(0, -1*Scale, 0));
  1698.  
  1699.  
  1700.  
  1701. local Leg1 = BasePart:clone();
  1702. Leg1.Size = Vector3.new(.2*Scale, 3.5*Scale, .5*Scale);
  1703. Leg1.Parent = Storage;
  1704. Leg1.BrickColor = BrickColor.Black();
  1705.  
  1706.  
  1707. WeldP(Leg1, Joint, CFrame.new(0, -1.75*Scale, 0), CFrame.new(0, -.75*Scale, 0) * CFrame.Angles(math.pi/3, 0, math.pi));
  1708.  
  1709.  
  1710. local Leg2 = BasePart:clone();
  1711. Leg2.Size = Vector3.new(.2*Scale, 3.5*Scale, .5*Scale);
  1712. Leg2.Parent = Storage;
  1713. Leg2.BrickColor = BrickColor.Black();
  1714.  
  1715.  
  1716. WeldP(Leg2, Joint, CFrame.new(0, -1.75*Scale, 0), CFrame.new(0, -.45*Scale, 0) * CFrame.Angles(-math.pi/4, 0, math.pi + -math.pi/6));
  1717.  
  1718.  
  1719. local Leg3 = BasePart:clone();
  1720. Leg3.Size = Vector3.new(.2*Scale, 3.5*Scale, .5*Scale);
  1721. Leg3.Parent = Storage;
  1722. Leg3.BrickColor = BrickColor.Black();
  1723.  
  1724.  
  1725. WeldP(Leg3, Joint, CFrame.new(0, -1.75*Scale, 0), CFrame.new(0, -.45*Scale, 0) * CFrame.Angles(-math.pi/4, 0, math.pi + math.pi/6));
  1726.  
  1727. for i,v in pairs(Storage:children()) do
  1728. if v.Name== "Part" then
  1729. trans = 1
  1730. v.Transparency = 1
  1731. end
  1732. end
  1733.  
  1734. local InvisiBox = BasePart:clone();
  1735. InvisiBox.Size = Storage:GetModelSize() + Vector3.new(2*Scale, 0, 0);
  1736. InvisiBox.Parent = Storage;
  1737. InvisiBox.Transparency = 1
  1738. InvisiBox.Name = 'box'
  1739. WeldP(InvisiBox, Joint, CFrame.new(0, -.2*Scale, .97*Scale));
  1740.  
  1741. local InvisiBox2 = BasePart:clone();
  1742. InvisiBox2.Size = Storage:GetModelSize() + Vector3.new(2*Scale, 0, 0);
  1743. InvisiBox2.Parent = Arms;
  1744. InvisiBox2.Transparency = .9
  1745. InvisiBox2.Name = 'box'
  1746. InvisiBox2.CanCollide = false
  1747. InvisiBox2.BrickColor = TeamColor
  1748. InvisiBox2.Material = 'Neon'
  1749. WeldP(InvisiBox2, Joint, CFrame.new(0, -1.2*Scale, .97*Scale));
  1750.  
  1751. InvisiBox.CFrame = torso.CFrame * CFrame.new(0, 5.5*Scale, -2.9) * CFrame.Angles(0, math.pi, 0);
  1752.  
  1753. local Action = "Idle";
  1754.  
  1755. local Target = nil;
  1756.  
  1757. wait(1)
  1758.  
  1759. InvisiBox.Anchored = true
  1760.  
  1761. for i,v in pairs(Storage:children()) do
  1762. if v:IsA'Part' then
  1763. v.Locked = true
  1764. end
  1765. end
  1766. --//
  1767. --// SOUNDS
  1768. --//
  1769. for i,v in pairs(Storage:children()) do
  1770. if v.Name== "Part" then
  1771. trans = 1
  1772. v.Transparency = 1
  1773. end
  1774. end
  1775. for i,v in pairs(Storage:children()) do
  1776. if v.Name== "Part" then
  1777. trans = 1
  1778. v.Transparency = 1
  1779. for i = 1,11 do
  1780.  
  1781. trans = trans - .1
  1782. v.Transparency = trans
  1783. wait()
  1784. end
  1785. end
  1786. end
  1787. trans = 1
  1788.  
  1789. local OnFind = new("Sound", TopFrame);
  1790. OnFind.SoundId = "rbxassetid://10209260"
  1791. OnFind.Volume = 1
  1792.  
  1793.  
  1794. local OnFire = new("Sound", TopFrame);
  1795. OnFire.SoundId = "rbxassetid://10209257"
  1796. OnFire.Volume = 1
  1797.  
  1798. local OnEmpty = new("Sound", TopFrame);
  1799. OnEmpty.SoundId = "rbxassetid://10209225"
  1800. OnEmpty.Volume = 1
  1801.  
  1802. local Scanning = new("Sound", TopFrame);
  1803. Scanning.SoundId = "rbxassetid://258704234"
  1804. Scanning.Volume = 1
  1805.  
  1806. local Explode = new("Sound", TopFrame);
  1807. Explode.SoundId = "rbxassetid://10209236"
  1808. Explode.Volume = .5
  1809.  
  1810. local Move = new("Sound", TopFrame);
  1811. Move.SoundId = "rbxassetid://258704467";
  1812. Move.Volume = 1;
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818. function FindShortest(Table)
  1819. local Current = Table[1]
  1820. local Final
  1821. for _,v in pairs(Table) do
  1822. if v[2] ~= Current[2] then
  1823. if v[1] < Current[1] then
  1824. Current = v
  1825. end
  1826. end
  1827. end
  1828. Final = Current
  1829. return Final
  1830. end
  1831.  
  1832. function GetNearbyPlayer()
  1833.  
  1834. local List = {}
  1835. for i,v in pairs(workspace:children()) do
  1836. if (v ~= nil) then
  1837. if (v:IsA'Model') then
  1838. if (v:findFirstChild'Torso' ~= nil) then
  1839. local rx, ry, rz = Hold.CFrame:toEulerAnglesXYZ();
  1840. if (v:findFirstChild'Torso'.Position - Hold.CFrame * CFrame.new(0, 0, 20) * CFrame.Angles(0, ry, 0).p).magnitude < 20 then
  1841. if (v ~= char) then
  1842. for x,z in next, v:children() do
  1843. if z:IsA'Humanoid' and z.Health > 0.01 then
  1844. table.insert(List, {(v:findFirstChild'Torso'.Position - Hold.CFrame * CFrame.new(0, 0, 20) * CFrame.Angles(0, ry, 0).p).magnitude, v})
  1845. end
  1846. end
  1847. end
  1848. end
  1849. end
  1850. end
  1851. end
  1852. end
  1853. if (FindShortest(List) ~= nil) then
  1854. return FindShortest(List)[2];
  1855. else
  1856. return nil;
  1857. end
  1858. end
  1859.  
  1860. local Health = Instance.new("Humanoid", Storage);
  1861. Health.MaxHealth = 150;
  1862. Health.Health = 150;
  1863.  
  1864.  
  1865.  
  1866. function RayC(Part, speed)
  1867. coroutine.wrap(function()
  1868. local Visual = BasePart:clone();
  1869. Visual.FormFactor = "Custom";
  1870. Visual.BrickColor = BrickColor.Yellow();
  1871. Visual.Size = Vector3.new(.2, 3, .2);
  1872. Visual.CFrame = Part.CFrame * CFrame.new(0, -1, 0);
  1873. Visual.Anchored = true;
  1874. Visual.CanCollide = false;
  1875. Visual.Locked = true
  1876.  
  1877.  
  1878. coroutine.wrap(function()
  1879.  
  1880. wait(.2)
  1881.  
  1882. wait(.1);
  1883. wait(.3)
  1884.  
  1885. end)()
  1886.  
  1887. Instance.new("SpecialMesh", Visual).MeshType = "Sphere";
  1888. Visual.Mesh.Scale = Vector3.new(.5, 1, .5);
  1889.  
  1890. local bulletpos = Visual.Position
  1891. local bulletvelocity = (Part.CFrame.p - bulletpos).unit*speed
  1892. local lastbulletpos = Visual.Position
  1893. Visual.Parent = Storage;
  1894. while game:service'RunService'.Stepped:wait() do
  1895.  
  1896. lastbulletpos = bulletpos
  1897. bulletpos = bulletpos + bulletvelocity
  1898. local RayCast = Ray.new(lastbulletpos, (bulletpos - lastbulletpos))
  1899. local hit, hitpos = workspace:FindPartOnRay(RayCast, Storage, false, true)
  1900. if (Joint.Position - Visual.Position).magnitude > 1000 or Visual.Parent == nil then
  1901. Visual:Destroy();
  1902. break
  1903. end
  1904. Visual.Anchored = true
  1905. Visual.CFrame = CFrame.new(bulletpos, bulletpos+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0);
  1906. if hit then
  1907. if hit.Parent:IsA'Hat' then
  1908. if hit.Parent.Parent:IsA'Model' then
  1909. for x,z in next, hit.Parent.Parent:children() do
  1910. if z:IsA'Humanoid' then
  1911. z:TakeDamage(math.random(666,666666));
  1912. end
  1913. end
  1914. end
  1915. else
  1916. if hit.Parent:IsA'Model' then
  1917. for x,z in next, hit.Parent:children() do
  1918. if z:IsA'Humanoid' then
  1919. z:TakeDamage(math.random(666,666666));
  1920. end
  1921. end
  1922. end
  1923. end
  1924.  
  1925. Visual:Destroy();
  1926. break
  1927. end
  1928. end
  1929. end)()
  1930. end
  1931.  
  1932. lastTick = tick();
  1933. local db = false;
  1934. game:service'RunService'.RenderStepped:connect(function()
  1935. if Action == "DEAD" then return end;
  1936.  
  1937.  
  1938. if not Wrangler then
  1939. --//
  1940. --// AUTOMATED MODE, MOTION SENSOR WILL DETECT MOVEMENT
  1941. --//
  1942.  
  1943.  
  1944. --//
  1945. --// IF PLAYER USED WRANGLER, THERE IS A SHIELD WICH MUST BE REMOVED
  1946. --//
  1947.  
  1948. if (Storage:findFirstChild'Shield') then
  1949. Storage:findFirstChild'Shield':Destroy();
  1950. end
  1951.  
  1952. local LastTarget = Target;
  1953.  
  1954. --//
  1955. --// CHECK FOR NEARBY ENEMIES
  1956. --//
  1957. local Player = GetNearbyPlayer();
  1958. Target = Player;
  1959.  
  1960. --//
  1961. --// BEEP ON TARGET FOUND
  1962. --//
  1963. if (Target ~= LastTarget and Target ~= nil) then
  1964. Move.Pitch = 0.9 + math.random()/9;
  1965. Move:play();
  1966. OnFind:play();
  1967. Action = "Standby";
  1968. end
  1969.  
  1970. --//
  1971. --// IDLE
  1972. --//
  1973. if Action == "Idle" then
  1974. RotateAxisX.C1 = clerp(RotateAxisX.C1, CFrame.Angles(0, SharpSin(tick()*2)*.2, 0), .1);
  1975. RotateAxisY.C0 = clerp(RotateAxisY.C0, CFrame.new(), .1);
  1976. end
  1977.  
  1978.  
  1979. --//
  1980. --// SENTRY DEAD
  1981. --//
  1982.  
  1983. --//
  1984. --// IF PLAYER EXISTS, FIRE!
  1985. --//
  1986.  
  1987.  
  1988.  
  1989. if Action == "Standby" then
  1990. pcall(function()
  1991. local tor = Target.Torso.CFrame.p -- Target CFrame
  1992. local direction = InvisiBox.CFrame.lookVector -- Direction handling, welds mess up, just a workaround.
  1993. local heading = math.atan2(direction.x, direction.z)--
  1994. local RotY = math.deg(heading)
  1995. if RotY < 0 then
  1996. RotY = (360 - math.abs(RotY));
  1997. end
  1998. RotateAxisX.C1 = --Begin here
  1999. clerp(RotateAxisX.C1,
  2000. CFrame.new(
  2001.  
  2002. Vector3.new(), --The Pivot0 of pointing the weld.
  2003. Vector3.new(tor.x, 0, tor.z) - Vector3.new(RotateAxisX.Part1.CFrame.x, 0, RotateAxisX.Part1.CFrame.z)) --We point the sentry here
  2004.  
  2005. * CFrame.Angles(0, math.rad(360) - math.rad(RotY), 0),
  2006. .1
  2007. );
  2008.  
  2009. local Point = Hold.CFrame:toObjectSpace(CFrame.new(Hold.CFrame.p,tor))*CFrame.Angles(0,math.rad(180),0)
  2010. local RX, RY, RZ = Point:toEulerAnglesXYZ()
  2011. if math.deg(RX) > 45 then
  2012. RX = math.rad(45)
  2013. elseif math.deg(RX) < -55 then
  2014. RX = math.rad(-55)
  2015. end
  2016. RotateAxisY.C0 = clerp(RotateAxisY.C0,CFrame.Angles(RX,0,0),.1)
  2017.  
  2018. end)
  2019. end
  2020. if Action == "Fire" then
  2021. pcall(function()
  2022. local tor = Target.Torso.CFrame.p;
  2023. local direction = InvisiBox.CFrame.lookVector
  2024. local heading = math.atan2(direction.x, direction.z)
  2025. local RotY = math.deg(heading)
  2026. if RotY < 0 then
  2027. RotY = (360 - math.abs(RotY));
  2028. end
  2029. RotateAxisX.C1 = --Begin here
  2030. clerp(RotateAxisX.C1,
  2031. CFrame.new(
  2032.  
  2033. Vector3.new(), --The Pivot0 of pointing the weld.
  2034. Vector3.new(tor.x, 0, tor.z) - Vector3.new(RotateAxisX.Part1.CFrame.x, 0, RotateAxisX.Part1.CFrame.z)) --We point the sentry here
  2035.  
  2036. * CFrame.Angles(0, math.rad(360) - math.rad(RotY), 0),
  2037. .1
  2038. );
  2039.  
  2040. BarrelWeld.C0 = clerp(BarrelWeld.C0, CFrame.new())
  2041. local Point = Hold.CFrame:toObjectSpace(CFrame.new(Hold.CFrame.p,tor))*CFrame.Angles(0,math.rad(180),0)
  2042. local RX, RY, RZ = Point:toEulerAnglesXYZ()
  2043. if math.deg(RX) > 45 then
  2044. RX = math.rad(45)
  2045. elseif math.deg(RX) < -55 then
  2046. RX = math.rad(-55)
  2047. end
  2048. RotateAxisY.C0 = clerp(RotateAxisY.C0,CFrame.Angles(RX,0,0),.1)
  2049. end)
  2050. end
  2051.  
  2052. if (Target ~= nil) then
  2053. if Action == "Fire" or db then return end
  2054. if Action == "Standby" then
  2055. db = true
  2056. wait(.2);
  2057. end
  2058. Action = "Fire";
  2059. db = false
  2060. OnFire:play();
  2061.  
  2062. Particle.Color = ColorSequence.new(Colors[math.random(#Colors)]);
  2063.  
  2064. local PointLight = Instance.new("PointLight", Barrel);
  2065. PointLight.Color = Color3.new(1,.8,0)
  2066. PointLight.Brightness = 6;
  2067. Particle.Enabled = true
  2068. game:service'Debris':AddItem(PointLight, .05);
  2069.  
  2070.  
  2071.  
  2072. RayC(Barrel, 20)
  2073.  
  2074.  
  2075.  
  2076.  
  2077. wait(.1)
  2078. Particle.Enabled = false
  2079. if (Target ~= nil) then
  2080. Action = "Standby";
  2081. else
  2082. Action = "Idle";
  2083. end
  2084. end
  2085.  
  2086. if tick() - lastTick > 2.5 and Target == nil then
  2087. lastTick = tick();
  2088. Scanning:play();
  2089. end
  2090. end
  2091.  
  2092. if (Health.Health < 0.0001 or RotateAxisX.Parent == nil) then
  2093. Action = "DEAD";
  2094. if db then return end
  2095. RotateAxisY:Destroy();
  2096. TurretToFrame:Destroy();
  2097. Joint:Destroy();
  2098. InvisiBox2:Destroy();
  2099. db = true
  2100. local expl = Instance.new("Explosion", Storage);
  2101.  
  2102. expl.BlastRadius = .3;
  2103. expl.BlastPressure = 2050000;
  2104. expl.Position = TopFrame.Position;
  2105. Explode:Play()
  2106. NoSentry = true
  2107. game:service'Debris':AddItem(Storage, 3);
  2108.  
  2109. end
  2110.  
  2111. end)
  2112. end
  2113.  
  2114.  
  2115.  
  2116. combo = 0
  2117. function strike(hit)
  2118. if hit and hit.Parent and hit.Parent.Name ~= char.Name then
  2119. local targetHumanoid = hit.Parent:FindFirstChild("Humanoid")
  2120. if targetHumanoid and targetHumanoid ~= char:FindFirstChild("Humanoid") then
  2121. if combo == 1 then
  2122. targetHumanoid:TakeDamage(slashDamage)
  2123. SwingH:Play()
  2124.  
  2125. end
  2126.  
  2127.  
  2128.  
  2129. end
  2130. end
  2131. end
  2132.  
  2133.  
  2134.  
  2135. Reaper5.Touched:connect(strike)
  2136. --------------------------------------------------------------------------------------------------------------------------
  2137. function AnimSit()
  2138. for i = 0, 1, 0.05 do
  2139.  
  2140. swait()
  2141. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, -1, -.6) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2142. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2143. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.3, .1) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.1)
  2144. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(5)), 0.1)
  2145. RH.C0 = clerp(RH.C0, cn(1, -.4, -.4) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2146. LH.C0 = clerp(LH.C0, cn(-1, -1, -.6) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(60)), .1)
  2147. end
  2148.  
  2149. end
  2150.  
  2151. function AnimSitHit1()
  2152. for i = 0, 1, 0.05 do
  2153.  
  2154. swait()
  2155. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, -1, -.6) * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  2156. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
  2157. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.3, .1) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.1)
  2158. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(170), math.rad(0), math.rad(-5)), 0.08)
  2159. RH.C0 = clerp(RH.C0, cn(1, -.4, -.4) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(10)), .1)
  2160. LH.C0 = clerp(LH.C0, cn(-1, -1, -.6) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(50)), .1)
  2161. end
  2162.  
  2163. end
  2164.  
  2165.  
  2166. function AnimSitHit2()
  2167. for i = 0, 1, 0.05 do
  2168.  
  2169. swait()
  2170. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, -1, -.6) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2171. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(15), math.rad(0), math.rad(0)), .1)
  2172. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.3, .1) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.1)
  2173. RW.C0 = clerp(RW.C0, CFrame.new(1.55, 0.4, -.1) * angles(math.rad(40), math.rad(3 ), math.rad(-15)), 0.3)
  2174. RH.C0 = clerp(RH.C0, cn(1, -.4, -.4) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2175. LH.C0 = clerp(LH.C0, cn(-1, -1, -.6) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(60)), .1)
  2176. end
  2177.  
  2178. end
  2179. --------------------------------------------------------------------------------------------------------------------------
  2180.  
  2181. function No1()
  2182. for i = 0, 1, 0.05 do
  2183.  
  2184. swait()
  2185. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2186. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(30), math.rad(0), math.rad(40)), .1)
  2187. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
  2188. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
  2189. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2190. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2191. end
  2192.  
  2193. end
  2194.  
  2195.  
  2196.  
  2197. function No2()
  2198. for i = 0, 1, 0.05 do
  2199.  
  2200. swait()
  2201. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2202. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-40)), .1)
  2203. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
  2204. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
  2205. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2206. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2207. end
  2208.  
  2209. end
  2210.  
  2211.  
  2212.  
  2213. --------------------------------------------------------------------------------------------------------------------------
  2214.  
  2215. function Yes1()
  2216. for i = 0, 1, 0.1 do
  2217.  
  2218. swait()
  2219. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2220. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(25), math.rad(0), math.rad(0)), .1)
  2221. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
  2222. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
  2223. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2224. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2225. end
  2226.  
  2227. end
  2228.  
  2229.  
  2230.  
  2231. function Yes2()
  2232. for i = 0, 1, 0.1 do
  2233.  
  2234. swait()
  2235. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2236. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  2237. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
  2238. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
  2239. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2240. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2241. end
  2242.  
  2243. end
  2244.  
  2245.  
  2246.  
  2247. --------------------------------------------------------------------------------------------------------------------------
  2248. function AttackAnim1()
  2249. for i = 0, 1, 0.05 do
  2250. swait()
  2251. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  2252. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
  2253. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(170), math.rad(0), math.rad(10)), 0.08)
  2254. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(40), math.rad(0), math.rad(10)), 0.3)
  2255. if Torsovelocity > 2 then
  2256. RH.C0 = clerp(RH.C0, cn(1, -1 + .1 * math.cos(sine / 5), 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
  2257. LH.C0 = clerp(LH.C0, cn(-1, -1 + .1 * math.cos(sine / 5), 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(30 * math.cos(sine / 4))), .3)
  2258. elseif Torsovelocity < 1 then
  2259. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(-5)), .1)
  2260. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(5)), .1)
  2261. end
  2262. end
  2263. end
  2264.  
  2265.  
  2266. function AttackAnim2()
  2267. for i = 0, 1, 0.05 do
  2268. swait()
  2269. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), .2)
  2270. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
  2271. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(10), math.rad(-10)), 0.25)
  2272. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(10)), 0.3)
  2273. if Torsovelocity > 2 then
  2274. RH.C0 = clerp(RH.C0, cn(1, -.9 + -.1 * math.cos(sine / 4),0 + -.1 * math.cos(sine / 4)) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
  2275. LH.C0 = clerp(LH.C0, cn(-1, -.9 + .1 * math.cos(sine / 4), 0 + .1 * math.cos(sine / 4)) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
  2276.  
  2277. elseif Torsovelocity < 1 then
  2278. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(5)), .1)
  2279. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(-5)), .1)
  2280. end
  2281. end
  2282. end
  2283. --------------------------------------------------------------------------------------------------------------------------
  2284.  
  2285.  
  2286.  
  2287. function ShotAttackAnim1()
  2288. for i = 0, 1, 0.07 do
  2289. swait()
  2290.  
  2291. if Torsovelocity > 2 then
  2292. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-50 - 5 * math.cos(sine / 5))), .2)
  2293. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(50 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
  2294. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(90), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.2)
  2295. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(85 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.2)
  2296. RH.C0 = clerp(RH.C0, cn(.9, -.9 + -.1 * math.cos(sine / 4),-.6) * RHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
  2297. LH.C0 = clerp(LH.C0, cn(-.9, -.9 + .1 * math.cos(sine / 4), .5) * LHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
  2298.  
  2299.  
  2300.  
  2301. elseif Torsovelocity < 1 then
  2302.  
  2303.  
  2304. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
  2305. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
  2306. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(90), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.2)
  2307. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(85 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.2)
  2308. RH.C0 = clerp(RH.C0, cn(.9, -.9 - 0.1 * math.cos(sine / 25), -.6) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
  2309. LH.C0 = clerp(LH.C0, cn(-.9, -.9 - 0.1 * math.cos(sine / 25), .5) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
  2310.  
  2311.  
  2312. end
  2313. end
  2314. end
  2315.  
  2316.  
  2317.  
  2318.  
  2319.  
  2320. function ShotAttackAnim2()
  2321. for i = 0, 1, 0.05 do
  2322. swait()
  2323.  
  2324. if Torsovelocity > 2 then
  2325. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-50 - 5 * math.cos(sine / 5))), .2)
  2326. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(50 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
  2327. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(100), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1)
  2328. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(75 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1)
  2329. RH.C0 = clerp(RH.C0, cn(.9, -.9 + -.1 * math.cos(sine / 4),-.6) * RHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
  2330. LH.C0 = clerp(LH.C0, cn(-.9, -.9 + .1 * math.cos(sine / 4), .5) * LHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
  2331.  
  2332.  
  2333.  
  2334. elseif Torsovelocity < 1 then
  2335.  
  2336.  
  2337. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
  2338. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
  2339. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.5, 0) * angles(math.rad(100), math.rad(0 - .01 * math.cos(sine / 25)), math.rad(-40 + 0.1 * math.cos(sine / 25))), 0.1)
  2340. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.4, -.4) * angles(math.rad(75 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-10 - 1 * math.cos(sine / 25))), 0.1)
  2341. RH.C0 = clerp(RH.C0, cn(.9, -.9 - 0.1 * math.cos(sine / 25), -.6) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
  2342. LH.C0 = clerp(LH.C0, cn(-.9, -.9 - 0.1 * math.cos(sine / 25), .5) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
  2343.  
  2344.  
  2345. end
  2346. end
  2347. end
  2348.  
  2349.  
  2350.  
  2351. function ShotAttackAnim3()
  2352. for i = 0, 1, 0.05 do
  2353. swait()
  2354.  
  2355. if Torsovelocity > 2 then
  2356. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-50 - 5 * math.cos(sine / 5))), .2)
  2357. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(50 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
  2358. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.56, -.2) * angles(math.rad(45), math.rad(-20 - .01 * math.cos(sine / 25)), math.rad(-70 + 0.1 * math.cos(sine / 25))), 0.2)
  2359. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.6, -.6) * angles(math.rad(115 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-30 - 1 * math.cos(sine / 25))), 0.2)
  2360. RH.C0 = clerp(RH.C0, cn(.9, -.9 + -.1 * math.cos(sine / 4),-.6) * RHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
  2361. LH.C0 = clerp(LH.C0, cn(-.9, -.9 + .1 * math.cos(sine / 4), .5) * LHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
  2362.  
  2363.  
  2364.  
  2365. elseif Torsovelocity < 1 then
  2366.  
  2367.  
  2368. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
  2369. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
  2370. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.56, -.2) * angles(math.rad(45), math.rad(-20 - .01 * math.cos(sine / 25)), math.rad(-70 + 0.1 * math.cos(sine / 25))), 0.2)
  2371. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.6, -.6) * angles(math.rad(115 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-30 - 1 * math.cos(sine / 25))), 0.2)
  2372. RH.C0 = clerp(RH.C0, cn(.9, -.9 - 0.1 * math.cos(sine / 25), -.6) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
  2373. LH.C0 = clerp(LH.C0, cn(-.9, -.9 - 0.1 * math.cos(sine / 25), .5) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
  2374.  
  2375.  
  2376. end
  2377. end
  2378. end
  2379.  
  2380. function ShotAttackAnim4()
  2381. for i = 0, 1, 0.05 do
  2382. swait()
  2383.  
  2384. if Torsovelocity > 2 then
  2385. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -0.05 + .1 * math.cos(sine / 3)) * angles(math.rad(5), math.rad(0) + RootPart.RotVelocity.Y / 30, math.rad(-50 - 5 * math.cos(sine / 5))), .2)
  2386. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-3), math.rad(0), math.rad(50 + 5 * math.cos(sine / 5)) + RootPart.RotVelocity.Y / 9), .2)
  2387. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.56, 0) * angles(math.rad(45), math.rad(-20 - .01 * math.cos(sine / 25)), math.rad(-70 + 0.1 * math.cos(sine / 25))), 0.2)
  2388. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.6, -.8) * angles(math.rad(115 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-50 - 1 * math.cos(sine / 25))), 0.2)
  2389. RH.C0 = clerp(RH.C0, cn(.9, -.9 + -.1 * math.cos(sine / 4),-.6) * RHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
  2390. LH.C0 = clerp(LH.C0, cn(-.9, -.9 + .1 * math.cos(sine / 4), .5) * LHCF * angles(math.rad(-2), math.rad(50), math.rad(50 * math.cos(sine / 4))), .3)
  2391.  
  2392.  
  2393.  
  2394. elseif Torsovelocity < 1 then
  2395.  
  2396.  
  2397. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
  2398. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
  2399. RW.C0 = clerp(RW.C0, CFrame.new(1.2, 0.56, 0) * angles(math.rad(45), math.rad(-20 - .01 * math.cos(sine / 25)), math.rad(-70 + 0.1 * math.cos(sine / 25))), 0.2)
  2400. LW.C0 = clerp(LW.C0, CFrame.new(-1.2, 0.6, -.8) * angles(math.rad(115 + 1 * math.cos(sine / 25)), math.rad(15), math.rad(-50 - 1 * math.cos(sine / 25))), 0.2)
  2401. RH.C0 = clerp(RH.C0, cn(.9, -.9 - 0.1 * math.cos(sine / 25), -.6) * RHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
  2402. LH.C0 = clerp(LH.C0, cn(-.9, -.9 - 0.1 * math.cos(sine / 25), .5) * LHCF * angles(math.rad(-2 + 1 * math.cos(sine / 25)), math.rad(50), math.rad(10 + 2 * math.cos(sine / 25))), .2)
  2403.  
  2404.  
  2405. end
  2406. end
  2407. end
  2408. --------------------------------------------------------------------------------------------------------------------------
  2409.  
  2410. function DanAni1()
  2411. for i = 0, .8, 0.05 + MusThingHat.Mesh.Scale.Y*0.025 do
  2412.  
  2413. swait()
  2414. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,-.4) * angles(math.rad(5), math.rad(-8), math.rad(0)), MusThingHat.Mesh.Scale.Y*0.2)
  2415. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(MusThingHat.Mesh.Scale.Y*30) +math.rad(-10),0,math.rad(0)),MusThingHat.Mesh.Scale.Y*0.2)
  2416. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -.25) * angles(math.rad(170), math.rad(0), math.rad(20)), MusThingHat.Mesh.Scale.Y*0.2)
  2417. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.0) * angles(math.rad(90), math.rad(0), math.rad(-45)), MusThingHat.Mesh.Scale.Y*0.2)
  2418. RH.C0 = clerp(RH.C0, cn(1, -.2, -.4) * RHCF * angles(math.rad(-4), math.rad(-15), math.rad(-5)), MusThingHat.Mesh.Scale.Y*0.3)
  2419. LH.C0 = clerp(LH.C0, cn(-1, -1, -.0) * LHCF * angles(math.rad(4), math.rad(5), math.rad(5)), MusThingHat.Mesh.Scale.Y*0.2)
  2420. end
  2421.  
  2422. end
  2423.  
  2424.  
  2425.  
  2426. function DanAni2()
  2427. for i = 0, .8, 0.05 + MusThingHat.Mesh.Scale.Y*0.025 do
  2428.  
  2429. swait()
  2430. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,-.5) * angles(math.rad(8), math.rad(8), math.rad(0)), MusThingHat.Mesh.Scale.Y*0.2)
  2431. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(MusThingHat.Mesh.Scale.Y*30) +math.rad(-10),0,math.rad(0)),MusThingHat.Mesh.Scale.Y*0.2)
  2432. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.6, -.25) * angles(math.rad(180), math.rad(0), math.rad(25)), MusThingHat.Mesh.Scale.Y*0.2)
  2433. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.0) * angles(math.rad(0), math.rad(0), math.rad(45)), MusThingHat.Mesh.Scale.Y*0.2)
  2434. RH.C0 = clerp(RH.C0, cn(1, -1, -.0) * RHCF * angles(math.rad(4), math.rad(-5), math.rad(-8)), MusThingHat.Mesh.Scale.Y*0.2)
  2435. LH.C0 = clerp(LH.C0, cn(-1, -.2, -.4) * LHCF * angles(math.rad(-4), math.rad(15), math.rad(8)), MusThingHat.Mesh.Scale.Y*0.3)
  2436. end
  2437.  
  2438.  
  2439. end
  2440.  
  2441.  
  2442.  
  2443. --------------------------------------------------------------------------------------------------------------------------
  2444.  
  2445. BuildNow = false
  2446.  
  2447. Shotuse = false
  2448.  
  2449. wait2 = false
  2450.  
  2451. mouse.KeyDown:connect(function(key)
  2452.  
  2453. if key == "g" and attack == false then
  2454. yes:Play()
  2455. humanoid.WalkSpeed = 0
  2456. attack = true
  2457. Yes1()
  2458. Yes2()
  2459. Yes1()
  2460. Yes2()
  2461. attack = false
  2462. humanoid.WalkSpeed = 16
  2463. end
  2464. end)
  2465.  
  2466.  
  2467. mouse.KeyDown:connect(function(key)
  2468. if key == "e" and attack == false then
  2469. if Wep == 1 then
  2470. Wep = 2
  2471. else
  2472. Wep = 1
  2473. end
  2474.  
  2475.  
  2476. end
  2477. end)
  2478.  
  2479. mouse.KeyDown:connect(function(key)
  2480. if key == "p" and attack == false then
  2481.  
  2482. Wep = 3
  2483.  
  2484.  
  2485.  
  2486. end
  2487. end)
  2488.  
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500. equippedgun = true
  2501.  
  2502.  
  2503.  
  2504.  
  2505. coroutine.wrap(function()
  2506. while equippedgun do
  2507.  
  2508. if spread < 0 then spread = 0 end
  2509. if humanoid.Health == 0 then break end
  2510.  
  2511.  
  2512. game:service'RunService'.Stepped:wait()
  2513. end
  2514. end)()
  2515.  
  2516. mouse.Button1Down:connect(function()
  2517. if debounce then return end
  2518. if equippedgun2 == true and attack == false then
  2519. Shotuse = true
  2520. debounce = true
  2521.  
  2522. wait(.2)
  2523.  
  2524. sound:play()
  2525.  
  2526.  
  2527.  
  2528. coroutine.wrap(function()
  2529. wait(0.3)
  2530. for angle = 0, 4 do
  2531.  
  2532. wait()
  2533. end
  2534.  
  2535. wait(0.2)
  2536. sound2:play()
  2537.  
  2538.  
  2539. wait(0.1)
  2540. for move = 0, 3 do
  2541. if move > 2 then return end
  2542.  
  2543.  
  2544. wait(0.06)
  2545. end
  2546. end)()
  2547. spread = spread + 1
  2548. coroutine.wrap(function()
  2549. for bullitz = 0, 7 do
  2550. if bullitz > 6 then return end
  2551. rayCast2(300, 1, Reaper4)
  2552. GunParticle.Enabled = true
  2553. local PointLight = Instance.new("PointLight", Reaper4);
  2554. PointLight.Color = Color3.new(.2,.2,0)
  2555. PointLight.Brightness = 2;
  2556. game:service'Debris':AddItem(PointLight, .05);
  2557. end
  2558. end)()
  2559. coroutine.wrap(function()
  2560. for _ = 0, 50 do
  2561. pcall(function()
  2562. spread = spread - 0.03
  2563. end)
  2564. wait()
  2565. end
  2566. end)()
  2567. wait(1)
  2568. debounce = false
  2569. end
  2570.  
  2571. end)
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581. mouse.Button1Down:connect(function(key)
  2582.  
  2583. if attack == false and Wep == 1 then
  2584. attack = true
  2585.  
  2586. AttackAnim1()
  2587. combo = 1
  2588. Swing:Play()
  2589. AttackAnim2()
  2590. attack = false
  2591. combo = 0
  2592. end
  2593. end)
  2594.  
  2595.  
  2596.  
  2597. mouse.KeyDown:connect(function(key)
  2598.  
  2599. if key == "f" and attack == false then
  2600. No:Play()
  2601. humanoid.WalkSpeed = 0
  2602. attack = true
  2603. No1()
  2604. No2()
  2605. attack = false
  2606. humanoid.WalkSpeed = 16
  2607. end
  2608. end)
  2609.  
  2610.  
  2611.  
  2612.  
  2613. mouse.KeyDown:connect(function(key)
  2614. if attack == false or DA == true then
  2615. if key == "r" and Wep == 3 then
  2616.  
  2617. if DA == false then
  2618. DA = true
  2619. RUS:Play()
  2620. attack=true
  2621. humanoid.WalkSpeed = 0
  2622. else
  2623. DA = false
  2624. RUS:Stop()
  2625. attack=false
  2626. humanoid.WalkSpeed = 16
  2627. end
  2628. end
  2629. end
  2630. end)
  2631.  
  2632.  
  2633.  
  2634. mouse.KeyDown:connect(function(key)
  2635.  
  2636. if key == "t" and attack == false then
  2637. Taunt:Play()
  2638. humanoid.WalkSpeed = 0
  2639. attack = true
  2640. No1()
  2641. Yes2()
  2642. attack = false
  2643. humanoid.WalkSpeed = 16
  2644. end
  2645. end)
  2646.  
  2647. mouse.KeyDown:connect(function(key)
  2648. if key == "z" then
  2649.  
  2650.  
  2651.  
  2652. if NoSentry == false and attack == false and wait2 == false then
  2653. wait2 = true
  2654. for i,v in pairs(script:children()) do
  2655. if (v:IsA'Model') then
  2656.  
  2657.  
  2658. for i,v in pairs(v:children()) do
  2659. if (v:IsA'Humanoid') then
  2660. v.Health = 0
  2661. end
  2662. end
  2663.  
  2664.  
  2665. end
  2666.  
  2667. NoSentry = true
  2668.  
  2669. end
  2670.  
  2671.  
  2672.  
  2673. end
  2674.  
  2675.  
  2676.  
  2677. if NoSentry == true and attack == false and wait2 == false and Wep == 1 then
  2678. attack = true
  2679. wait2 = true
  2680. humanoid.WalkSpeed = 0
  2681. AnimSit()
  2682. AnimSitHit1()
  2683. WSH = WSHM[math.random(1,#WSHM)]
  2684. HitM.SoundId = "rbxassetid://"..WSH
  2685. HitM:Play()
  2686. BuildNow = true
  2687. AnimSitHit2()
  2688. AnimSitHit1()
  2689. WSH = WSHM[math.random(1,#WSHM)]
  2690. HitM.SoundId = "rbxassetid://"..WSH
  2691. HitM:Play()
  2692. AnimSitHit2()
  2693. AnimSitHit1()
  2694. WSH = WSHM[math.random(1,#WSHM)]
  2695. HitM.SoundId = "rbxassetid://"..WSH
  2696. HitM:Play()
  2697. AnimSitHit2()
  2698. AnimSitHit1()
  2699. WSH = WSHM[math.random(1,#WSHM)]
  2700. HitM.SoundId = "rbxassetid://"..WSH
  2701. HitM:Play()
  2702. AnimSitHit2()
  2703. AnimSitHit1()
  2704. WSH = WSHM[math.random(1,#WSHM)]
  2705. HitM.SoundId = "rbxassetid://"..WSH
  2706. HitM:Play()
  2707. AnimSitHit2()
  2708. AnimSitHit1()
  2709. WSH = WSHM[math.random(1,#WSHM)]
  2710. HitM.SoundId = "rbxassetid://"..WSH
  2711. HitM:Play()
  2712. AnimSitHit2()
  2713. AnimSitHit1()
  2714. WSH = WSHM[math.random(1,#WSHM)]
  2715. HitM.SoundId = "rbxassetid://"..WSH
  2716. HitM:Play()
  2717. AnimSitHit2()
  2718. AnimSitHit1()
  2719. WSH = WSHM[math.random(1,#WSHM)]
  2720. HitM.SoundId = "rbxassetid://"..WSH
  2721. HitM:Play()
  2722. AnimSitHit2()
  2723. AnimSitHit1()
  2724. WSH = WSHM[math.random(1,#WSHM)]
  2725. HitM.SoundId = "rbxassetid://"..WSH
  2726. HitM:Play()
  2727. AnimSitHit2()
  2728. AnimSitHit1()
  2729. WSH = WSHM[math.random(1,#WSHM)]
  2730. HitM.SoundId = "rbxassetid://"..WSH
  2731. HitM:Play()
  2732. AnimSitHit2()
  2733. AnimSit()
  2734.  
  2735. humanoid.WalkSpeed = 16
  2736. attack = false
  2737. NoSentry = false
  2738.  
  2739. end
  2740. wait()
  2741.  
  2742. wait2 = false
  2743. end end)
  2744.  
  2745.  
  2746.  
  2747. humanoid.Died:connect(function()
  2748. Arms:Destroy()
  2749. end)
  2750.  
  2751. print([[
  2752.  
  2753.  
  2754. ----------------------------------------
  2755. Tf2 Engineer Class
  2756. ----------------------------------------
  2757. Script by: 123jl123
  2758. Sentry by: Madiik
  2759. TheBoozled gave me a Mesh and Sounds from tf2
  2760. ----------------------------------------
  2761. Dont leak and dont do it.....
  2762. ----------------------------------------
  2763. ]])
  2764.  
  2765. game:GetService("RunService"):BindToRenderStep("ew", 0, function()
  2766. MusThingHat.Mesh.Scale = Vector3.new(MusThingHat.Mesh.Scale.X, RUS.PlaybackLoudness / 160, MusThingHat.Mesh.Scale.Z)
  2767. end)
  2768.  
  2769. local mesh1anan = Instance.new("SpecialMesh")
  2770. mesh1anan.MeshType = Enum.MeshType.FileMesh
  2771. mesh1anan.Scale = Vector3.new(3,3,3)
  2772. mesh1anan.MeshId = "http://www.roblox.com/asset/?id=521754610"
  2773. mesh1anan.TextureId = "http://www.roblox.com/asset/?id=521754612"
  2774.  
  2775. Glow1 = Color3.new(1,1,1)
  2776. Glow2 = Color3.new(0,0,0)
  2777.  
  2778. GlowParticle = Instance.new("ParticleEmitter")
  2779. GlowParticle.LightEmission = 1
  2780.  
  2781. GlowParticle.Size = NumberSequence.new(0,2)
  2782. GlowParticle.Texture = "http://www.roblox.com/asset/?id=52620985"
  2783. GlowParticle.Transparency = NumberSequence.new(0,1)
  2784. GlowParticle.LockedToPart = false
  2785. GlowParticle.Lifetime = NumberRange.new(0.5)
  2786. GlowParticle.Rate= 25
  2787. GlowParticle.Speed =NumberRange.new(0)
  2788.  
  2789.  
  2790. function RainDucks()
  2791. local locationanan = char.Torso.CFrame
  2792. local tacoa = Instance.new("Part")
  2793. tacoa.Size = Vector3.new(.5,.5,.5)
  2794. tacoa.CanCollide = false
  2795. tacoa.RotVelocity = Vector3.new(math.random(0,6),math.random(0,6),math.random(0,6))
  2796. local meshanananan = mesh1anan:clone()
  2797. meshanananan.Parent = tacoa
  2798. meshanananan.Scale = Vector3.new(1,1,1)
  2799. tacoa.CFrame = locationanan * CFrame.new(math.random(-8,8),math.random(10,40),math.random(-8,8))
  2800. tacoa.Parent = workspace
  2801.  
  2802.  
  2803. game:GetService("Debris"):AddItem(tacoa,4)
  2804. local GP = GlowParticle:clone()
  2805. GP.Parent = tacoa
  2806. Glow1 = Color3.new(math.random(), math.random(), math.random())
  2807. GP.Color = ColorSequence.new(Glow1,Glow2)
  2808.  
  2809. end
  2810.  
  2811.  
  2812.  
  2813. --]]
  2814.  
  2815.  
  2816.  
  2817. while true do wait()
  2818. if BuildNow == true then
  2819. BuildNow = false
  2820.  
  2821. BuildSentry()
  2822. end
  2823. if Shotuse == true then
  2824. Shotuse = false
  2825. attack = true
  2826. ShotAttackAnim1()
  2827. GunParticle.Enabled = false
  2828. ShotAttackAnim2()
  2829. ShotAttackAnim3()
  2830. ShotAttackAnim4()
  2831. ShotAttackAnim3()
  2832. attack = false
  2833. end
  2834.  
  2835.  
  2836.  
  2837.  
  2838. if DA == true then
  2839. DanAni1()
  2840. RainDucks()
  2841. local PointLight = Instance.new("PointLight", Torso);
  2842. PointLight.Color = Color3.new(math.random(), math.random(), math.random())
  2843. PointLight.Brightness = 50;
  2844. PointLight.Range = MusThingHat.Mesh.Scale.Y*10;
  2845. game:service'Debris':AddItem(PointLight, .3);
  2846.  
  2847. DanAni2()
  2848. RainDucks()
  2849. local PointLight = Instance.new("PointLight", Torso);
  2850. PointLight.Color = Color3.new(math.random(), math.random(), math.random())
  2851. PointLight.Brightness = 50;
  2852. PointLight.Range = MusThingHat.Mesh.Scale.Y*10;
  2853. game:service'Debris':AddItem(PointLight, .3);
  2854.  
  2855.  
  2856.  
  2857. end
  2858.  
  2859.  
  2860.  
  2861.  
  2862.  
  2863.  
  2864. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement