Advertisement
DylanD2003

Untitled

Oct 15th, 2017
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 92.44 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 = {'379482691','205978288','205978288','379482691'}
  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=141312550"
  97. sound.Volume = 2
  98. sound.Pitch = 1
  99. sound.TimePosition = 3.4
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106. local sound2 = Instance.new("Sound",head)
  107. sound2.SoundId = "http://www.roblox.com/asset?id=247205673"
  108. sound2.Volume = 1
  109. sound2.Pitch = 2
  110. sound2.TimePosition = 6
  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(0,0,0),
  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,0,-.58)*CFrame.Angles(0,3.15,0),
  449. Part1 = Reaper3,
  450. })
  451. local Mesh = AddInstance("SpecialMesh",{
  452. Parent = Reaper3,
  453. MeshId = "rbxassetid://685445946",
  454. TextureId = "rbxassetid://685446004",
  455. Scale = Vector3.new(.01,.01,.01),
  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://670610452",
  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(-.3,-1,-1)*CFrame.Angles(5,-10,0),
  548. Part1 = Reaper5,
  549. })
  550. local Mesh = AddInstance("SpecialMesh",{
  551. Parent = Reaper5,
  552. MeshId = "rbxassetid://431017802",
  553. TextureId = "rbxassetid://431017809",
  554. Scale = Vector3.new(.005,.005,.005),
  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 = 1
  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 = 1
  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 = 1
  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 = 1
  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 = 1
  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,-1.5,-.5)*CFrame.Angles(5,3,0),
  689. Part1 = Reaper6,
  690. })
  691. local Mesh = AddInstance("SpecialMesh",{
  692. Parent = Reaper6,
  693. MeshId = "rbxassetid://431017802",
  694. TextureId = "rbxassetid://431017809",
  695. Scale = Vector3.new(.005,.005,.005),
  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://175603500"
  1408. No.Volume = 3
  1409. No.TimePosition = 17.5
  1410. local yes = Instance.new("Sound", head);
  1411. yes.SoundId = "rbxassetid://389421766"
  1412. yes.Volume = 10
  1413. local HitM = Instance.new("Sound", Reaper5);
  1414. HitM.SoundId = "rbxassetid://"..WSH
  1415. HitM.Volume = 1.1
  1416. local Swing = Instance.new("Sound", Reaper5);
  1417. Swing.SoundId = "rbxassetid://10209850"
  1418. Swing.Volume = 1.5
  1419. Swing.Pitch = 1.1
  1420. local SwingH = Instance.new("Sound", Reaper5);
  1421. SwingH.SoundId = "rbxassetid://143133249"
  1422. SwingH.Volume = 2.9
  1423. SwingH.Pitch = 1.1
  1424. SwingH.TimePosition = 3
  1425. local Taunt = Instance.new("Sound", head);
  1426. Taunt.SoundId = "rbxassetid://130759239"
  1427. Taunt.Volume = 2
  1428. Taunt.TimePosition = 46
  1429. local RUS = Instance.new("Sound", char);
  1430. RUS.SoundId = "rbxassetid://269663918"
  1431. RUS.Volume = 10
  1432. RUS.Pitch = 1
  1433. RUS.Looped = true
  1434. RUS.TimePosition = 28.3
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444. function BuildSentry()
  1445. do --CFrame lerp (stravant, clerp by AntiBoomz0r)
  1446. local function QuaternionFromCFrame(cf) -- y u no axis angle interpolation?
  1447. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  1448. local trace = m00 + m11 + m22
  1449. if trace > 0 then
  1450. local s = math.sqrt(1 + trace)
  1451. local recip = 0.5/s
  1452. return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5
  1453. else
  1454. local i = 0
  1455. if m11 > m00 then
  1456. i = 1
  1457. end
  1458. if m22 > (i == 0 and m00 or m11) then
  1459. i = 2
  1460. end
  1461. if i == 0 then
  1462. local s = math.sqrt(m00-m11-m22+1)
  1463. local recip = 0.5/s
  1464. return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip
  1465. elseif i == 1 then
  1466. local s = math.sqrt(m11-m22-m00+1)
  1467. local recip = 0.5/s
  1468. return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip
  1469. elseif i == 2 then
  1470. local s = math.sqrt(m22-m00-m11+1)
  1471. local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip
  1472. end
  1473. end
  1474. end
  1475. local function QuaternionToCFrame(px, py, pz, x, y, z, w)
  1476. local xs, ys, zs = x + x, y + y, z + z
  1477. local wx, wy, wz = w*xs, w*ys, w*zs
  1478. local xx = x*xs
  1479. local xy = x*ys
  1480. local xz = x*zs
  1481. local yy = y*ys
  1482. local yz = y*zs
  1483. local zz = z*zs
  1484. 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))
  1485. end
  1486. function QuaternionSlerp(a, b, t)
  1487. local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4]
  1488. local startInterp, finishInterp;
  1489. if cosTheta >= 0.0001 then
  1490. if (1 - cosTheta) > 0.0001 then
  1491. local theta = math.acos(cosTheta)
  1492. local invSinTheta = 1/math.sin(theta)
  1493. startInterp = math.sin((1-t)*theta)*invSinTheta
  1494. finishInterp = math.sin(t*theta)*invSinTheta
  1495. else
  1496. startInterp = 1-t
  1497. finishInterp = t
  1498. end
  1499. else
  1500. if (1+cosTheta) > 0.0001 then
  1501. local theta = math.acos(-cosTheta)
  1502. local invSinTheta = 1/math.sin(theta)
  1503. startInterp = math.sin((t-1)*theta)*invSinTheta
  1504. finishInterp = math.sin(t*theta)*invSinTheta
  1505. else
  1506. startInterp = t-1
  1507. finishInterp = t
  1508. end
  1509. end
  1510. 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
  1511. end
  1512. function clerp(a,b,t)
  1513. local qa = {QuaternionFromCFrame(a)}
  1514. local qb = {QuaternionFromCFrame(b)}
  1515. local ax, ay, az = a.x, a.y, a.z
  1516. local bx, by, bz = b.x, b.y, b.z
  1517. local _t = 1-t
  1518. return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t))
  1519. end
  1520. end
  1521.  
  1522.  
  1523.  
  1524.  
  1525. local ABS = math.abs;
  1526. local SIN = math.sin;
  1527. local ASIN = math.asin;
  1528. local COS = math.cos;
  1529.  
  1530. local new = Instance.new;
  1531.  
  1532. function math_pos(float)
  1533. if float < 0 then float = 0 end
  1534. return float
  1535. end
  1536. function math_neg(float)
  1537. if float > 0 then float = 0 end
  1538. return float
  1539. end
  1540. function math_max(float, max)
  1541. if float > max then float = max end
  1542. return float
  1543. end
  1544. function math_min(float, min)
  1545. if float > min then float = min end
  1546. return float
  1547. end
  1548.  
  1549. function SharpSin(double_p1)
  1550. return ASIN(SIN(double_p1));
  1551. end
  1552.  
  1553. local Storage = Instance.new("Model", script);
  1554.  
  1555. function WeldP(part0, part1, C0, C1)
  1556. local W = new("Weld", Storage);
  1557. W.Part0 = part0;
  1558. W.Part1 = part1;
  1559. W.C0 = C0 or CFrame.new();
  1560. W.C1 = C1 or CFrame.new();
  1561. return W;
  1562. end
  1563.  
  1564. function Bevel(part, sizeV3)
  1565. local BvlMesh = new("SpecialMesh", part)
  1566. BvlMesh.MeshId = "rbxasset://fonts/torso.mesh";
  1567. if (sizeV3 ~= nil) then
  1568. BvlMesh.Scale = Vector3.new(sizeV3.x/2, sizeV3.y/2, sizeV3.z);
  1569. else
  1570. BvlMesh.Scale = Vector3.new(part.Size.x/2, part.Size.y/2, part.Size.z);
  1571. end
  1572. end
  1573.  
  1574.  
  1575.  
  1576. local Scale = 0.5 -- 1 is size of a robloxian (mostly);
  1577.  
  1578. Storage.Name = "ä";
  1579.  
  1580. local BasePart = new("Part");
  1581. BasePart.FormFactor = "Custom";
  1582. BasePart.TopSurface = 10;
  1583. BasePart.BottomSurface = 10;
  1584. BasePart.LeftSurface = 10;
  1585. BasePart.RightSurface = 10;
  1586. BasePart.FrontSurface = 10;
  1587. BasePart.BackSurface = 10;
  1588.  
  1589. local CylPart = new("Part");
  1590. CylPart.FormFactor = "Custom";
  1591. CylPart.TopSurface = 10;
  1592. CylPart.BottomSurface = 10;
  1593. CylPart.LeftSurface = 10;
  1594. CylPart.RightSurface = 10;
  1595. CylPart.FrontSurface = 10;
  1596. CylPart.BackSurface = 10;
  1597. new("CylinderMesh", CylPart);
  1598.  
  1599. local TopFrame = BasePart:clone()
  1600. TopFrame.Parent = Storage;
  1601. TopFrame.Size = Vector3.new(3.5*Scale, 1.5*Scale, 3.5*Scale);
  1602. TopFrame.BrickColor = TeamColor;
  1603.  
  1604. new("CylinderMesh", TopFrame);
  1605.  
  1606. local Screw = CylPart:clone();
  1607. Screw.Parent = Storage;
  1608. Screw.Size = Vector3.new(.3*Scale, 1.6*Scale, .3*Scale);
  1609. Screw.BrickColor = BrickColor.new(199);
  1610.  
  1611. local CGreyStyle = CylPart:clone()
  1612. CGreyStyle.Parent = Storage;
  1613. CGreyStyle.Size = Vector3.new(2.2*Scale, 1.52*Scale, 2.6*Scale);
  1614. CGreyStyle.BrickColor = BrickColor.new(199);
  1615.  
  1616. local TurretCasing = BasePart:clone();
  1617. TurretCasing.Size = Vector3.new(2.2*Scale, 1.4*Scale, 5.6*Scale);
  1618. TurretCasing.BrickColor = BrickColor.new(199);
  1619. TurretCasing.Parent = Storage;
  1620.  
  1621. Bevel(TurretCasing);
  1622.  
  1623. local TurretFront = BasePart:clone();
  1624. TurretFront.Size = Vector3.new(1.7*Scale, 1*Scale, .2*Scale);
  1625. TurretFront.BrickColor = TeamColor;
  1626. TurretFront.Parent = Storage;
  1627.  
  1628. local Barrel = CylPart:clone();
  1629. Barrel.Parent = Storage;
  1630. Barrel.Size = Vector3.new(.7*Scale, .4*Scale, .7*Scale);
  1631. Barrel.BrickColor = BrickColor.Black();
  1632.  
  1633.  
  1634. local Particle = Instance.new("ParticleEmitter", Barrel);
  1635. Particle.VelocitySpread = 30;
  1636. Particle.LightEmission = 200;
  1637.  
  1638. local Colors = {Color3.new(1,.5,0), Color3.new(1,.7,0), Color3.new(1,.9,0);}
  1639.  
  1640. Particle.Size = NumberSequence.new(.05,.07);
  1641.  
  1642. Particle.Color = ColorSequence.new(Colors[math.random(#Colors)]);
  1643. Particle.Texture = "rbxassetid://252350680";
  1644. Particle.RotSpeed = NumberRange.new(10,70);
  1645. Particle.Rate = 300;
  1646. Particle.Speed = NumberRange.new(15);
  1647. Particle.Transparency = NumberSequence.new(0,1);
  1648. Particle.Lifetime = NumberRange.new(.01,.2);
  1649. Particle.Enabled = false
  1650.  
  1651.  
  1652.  
  1653. local RedDot = BasePart:clone();
  1654. RedDot.Parent = Storage;
  1655. RedDot.Size = Vector3.new(.2*Scale, .2*Scale, .2*Scale);
  1656. RedDot.BrickColor = BrickColor.new("Really red");
  1657.  
  1658. local Sphere = Instance.new("SpecialMesh", RedDot);
  1659. Sphere.MeshType = "Sphere";
  1660. Sphere.Scale = Vector3.new(1*Scale,1*Scale,1*Scale);
  1661.  
  1662.  
  1663. Bevel(TurretFront, Vector3.new(1.7*Scale, 1*Scale, .05*Scale));
  1664.  
  1665. local Joint = CylPart:clone();
  1666. Joint.Parent = Storage;
  1667. Joint.Size = Vector3.new(.7*Scale, 2*Scale, .7*Scale);
  1668. Joint.BrickColor = BrickColor.Black();
  1669.  
  1670. local Hold = BasePart:clone();
  1671. Hold.Parent = Storage;
  1672. Hold.BrickColor = BrickColor.Black();
  1673. Hold.Size = Vector3.new(2.2*Scale, .2*Scale, .75*Scale);
  1674.  
  1675. local Bolt = BasePart:clone();
  1676. Bolt.Size = Vector3.new(.2*Scale, 1.5*Scale, .5*Scale);
  1677. Bolt.Parent = Storage;
  1678. Bolt.BrickColor = BrickColor.Black();
  1679.  
  1680. local Bolt2 = BasePart:clone();
  1681. Bolt2.Size = Vector3.new(.2*Scale, 1.5*Scale, .5*Scale);
  1682. Bolt2.Parent = Storage;
  1683. Bolt2.BrickColor = BrickColor.Black();
  1684.  
  1685.  
  1686. local TurretToFrame = WeldP(TopFrame, TurretCasing, CFrame.new(0, 0, 1.4*Scale));
  1687. WeldP(TopFrame, CGreyStyle);
  1688. WeldP(TurretCasing, TurretFront, CFrame.new(0, 0, 2.8*Scale));
  1689. WeldP(TopFrame, Screw);
  1690. local BarrelWeld = WeldP(Barrel, TurretFront, CFrame.new(.3*Scale, -.2*Scale, 0), CFrame.Angles(math.pi/2, 0, 0));
  1691.  
  1692. WeldP(RedDot, TurretFront, CFrame.new(-.55*Scale, 0, -.15*Scale), CFrame.Angles(math.pi/2, 0, 0));
  1693.  
  1694. local RotateAxisY = WeldP(Bolt, TurretCasing, CFrame.Angles(0,0,0), CFrame.new(1.1*Scale, -.75*Scale, 1*Scale));
  1695.  
  1696. WeldP(Bolt, Hold, CFrame.new(-1.1*Scale, -.5*Scale, 0));
  1697.  
  1698. WeldP(Bolt2, Hold, CFrame.new(1.1*Scale, -.5*Scale, 0));
  1699.  
  1700. local RotateAxisX = WeldP(Hold, Joint, CFrame.new(0, -1*Scale, 0));
  1701.  
  1702.  
  1703.  
  1704. local Leg1 = BasePart:clone();
  1705. Leg1.Size = Vector3.new(.2*Scale, 3.5*Scale, .5*Scale);
  1706. Leg1.Parent = Storage;
  1707. Leg1.BrickColor = BrickColor.Black();
  1708.  
  1709.  
  1710. WeldP(Leg1, Joint, CFrame.new(0, -1.75*Scale, 0), CFrame.new(0, -.75*Scale, 0) * CFrame.Angles(math.pi/3, 0, math.pi));
  1711.  
  1712.  
  1713. local Leg2 = BasePart:clone();
  1714. Leg2.Size = Vector3.new(.2*Scale, 3.5*Scale, .5*Scale);
  1715. Leg2.Parent = Storage;
  1716. Leg2.BrickColor = BrickColor.Black();
  1717.  
  1718.  
  1719. 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));
  1720.  
  1721.  
  1722. local Leg3 = BasePart:clone();
  1723. Leg3.Size = Vector3.new(.2*Scale, 3.5*Scale, .5*Scale);
  1724. Leg3.Parent = Storage;
  1725. Leg3.BrickColor = BrickColor.Black();
  1726.  
  1727.  
  1728. 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));
  1729.  
  1730. for i,v in pairs(Storage:children()) do
  1731. if v.Name== "Part" then
  1732. trans = 1
  1733. v.Transparency = 1
  1734. end
  1735. end
  1736.  
  1737. local InvisiBox = BasePart:clone();
  1738. InvisiBox.Size = Storage:GetModelSize() + Vector3.new(2*Scale, 0, 0);
  1739. InvisiBox.Parent = Storage;
  1740. InvisiBox.Transparency = 1
  1741. InvisiBox.Name = 'box'
  1742. WeldP(InvisiBox, Joint, CFrame.new(0, -.2*Scale, .97*Scale));
  1743.  
  1744. local InvisiBox2 = BasePart:clone();
  1745. InvisiBox2.Size = Storage:GetModelSize() + Vector3.new(2*Scale, 0, 0);
  1746. InvisiBox2.Parent = Arms;
  1747. InvisiBox2.Transparency = .9
  1748. InvisiBox2.Name = 'box'
  1749. InvisiBox2.CanCollide = false
  1750. InvisiBox2.BrickColor = TeamColor
  1751. InvisiBox2.Material = 'Neon'
  1752. WeldP(InvisiBox2, Joint, CFrame.new(0, -1.2*Scale, .97*Scale));
  1753.  
  1754. InvisiBox.CFrame = torso.CFrame * CFrame.new(0, 5.5*Scale, -2.9) * CFrame.Angles(0, math.pi, 0);
  1755.  
  1756. local Action = "Idle";
  1757.  
  1758. local Target = nil;
  1759.  
  1760. wait(1)
  1761.  
  1762. InvisiBox.Anchored = true
  1763.  
  1764. for i,v in pairs(Storage:children()) do
  1765. if v:IsA'Part' then
  1766. v.Locked = true
  1767. end
  1768. end
  1769. --//
  1770. --// SOUNDS
  1771. --//
  1772. for i,v in pairs(Storage:children()) do
  1773. if v.Name== "Part" then
  1774. trans = 1
  1775. v.Transparency = 1
  1776. end
  1777. end
  1778. for i,v in pairs(Storage:children()) do
  1779. if v.Name== "Part" then
  1780. trans = 1
  1781. v.Transparency = 1
  1782. for i = 1,11 do
  1783.  
  1784. trans = trans - .1
  1785. v.Transparency = trans
  1786. wait()
  1787. end
  1788. end
  1789. end
  1790. trans = 1
  1791.  
  1792. local OnFind = new("Sound", TopFrame);
  1793. OnFind.SoundId = "rbxassetid://152250094"
  1794. OnFind.Volume = 1
  1795. OnFind.TimePosition = .5
  1796.  
  1797.  
  1798. local OnFire = new("Sound", TopFrame);
  1799. OnFire.SoundId = "rbxassetid://347302718"
  1800. OnFire.Volume = 1
  1801.  
  1802. local OnEmpty = new("Sound", TopFrame);
  1803. OnEmpty.SoundId = "rbxassetid://10209225"
  1804. OnEmpty.Volume = 1
  1805.  
  1806. local Scanning = new("Sound", TopFrame);
  1807. Scanning.SoundId = "rbxassetid://361768597"
  1808. Scanning.Volume = .02
  1809.  
  1810. local Explode = new("Sound", TopFrame);
  1811. Explode.SoundId = "rbxassetid://315775189"
  1812. Explode.Volume = .5
  1813.  
  1814. local Move = new("Sound", TopFrame);
  1815. Move.SoundId = "rbxassetid://258704467";
  1816. Move.Volume = 1;
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822. function FindShortest(Table)
  1823. local Current = Table[1]
  1824. local Final
  1825. for _,v in pairs(Table) do
  1826. if v[2] ~= Current[2] then
  1827. if v[1] < Current[1] then
  1828. Current = v
  1829. end
  1830. end
  1831. end
  1832. Final = Current
  1833. return Final
  1834. end
  1835.  
  1836. function GetNearbyPlayer()
  1837.  
  1838. local List = {}
  1839. for i,v in pairs(workspace:children()) do
  1840. if (v ~= nil) then
  1841. if (v:IsA'Model') then
  1842. if (v:findFirstChild'Torso' ~= nil) then
  1843. local rx, ry, rz = Hold.CFrame:toEulerAnglesXYZ();
  1844. if (v:findFirstChild'Torso'.Position - Hold.CFrame * CFrame.new(0, 0, 20) * CFrame.Angles(0, ry, 0).p).magnitude < 20 then
  1845. if (v ~= char) then
  1846. for x,z in next, v:children() do
  1847. if z:IsA'Humanoid' and z.Health > 0.01 then
  1848. table.insert(List, {(v:findFirstChild'Torso'.Position - Hold.CFrame * CFrame.new(0, 0, 20) * CFrame.Angles(0, ry, 0).p).magnitude, v})
  1849. end
  1850. end
  1851. end
  1852. end
  1853. end
  1854. end
  1855. end
  1856. end
  1857. if (FindShortest(List) ~= nil) then
  1858. return FindShortest(List)[2];
  1859. else
  1860. return nil;
  1861. end
  1862. end
  1863.  
  1864. local Health = Instance.new("Humanoid", Storage);
  1865. Health.MaxHealth = 150;
  1866. Health.Health = 150;
  1867.  
  1868.  
  1869.  
  1870. function RayC(Part, speed)
  1871. coroutine.wrap(function()
  1872. local Visual = BasePart:clone();
  1873. Visual.FormFactor = "Custom";
  1874. Visual.BrickColor = BrickColor.Yellow();
  1875. Visual.Size = Vector3.new(.2, 3, .2);
  1876. Visual.CFrame = Part.CFrame * CFrame.new(0, -1, 0);
  1877. Visual.Anchored = true;
  1878. Visual.CanCollide = false;
  1879. Visual.Locked = true
  1880.  
  1881.  
  1882. coroutine.wrap(function()
  1883.  
  1884. wait(.2)
  1885.  
  1886. wait(.1);
  1887. wait(.3)
  1888.  
  1889. end)()
  1890.  
  1891. Instance.new("SpecialMesh", Visual).MeshType = "Sphere";
  1892. Visual.Mesh.Scale = Vector3.new(.5, 1, .5);
  1893.  
  1894. local bulletpos = Visual.Position
  1895. local bulletvelocity = (Part.CFrame.p - bulletpos).unit*speed
  1896. local lastbulletpos = Visual.Position
  1897. Visual.Parent = Storage;
  1898. while game:service'RunService'.Stepped:wait() do
  1899.  
  1900. lastbulletpos = bulletpos
  1901. bulletpos = bulletpos + bulletvelocity
  1902. local RayCast = Ray.new(lastbulletpos, (bulletpos - lastbulletpos))
  1903. local hit, hitpos = workspace:FindPartOnRay(RayCast, Storage, false, true)
  1904. if (Joint.Position - Visual.Position).magnitude > 1000 or Visual.Parent == nil then
  1905. Visual:Destroy();
  1906. break
  1907. end
  1908. Visual.Anchored = true
  1909. Visual.CFrame = CFrame.new(bulletpos, bulletpos+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0);
  1910. if hit then
  1911. if hit.Parent:IsA'Hat' then
  1912. if hit.Parent.Parent:IsA'Model' then
  1913. for x,z in next, hit.Parent.Parent:children() do
  1914. if z:IsA'Humanoid' then
  1915. z:TakeDamage(math.random(666,666666));
  1916. end
  1917. end
  1918. end
  1919. else
  1920. if hit.Parent:IsA'Model' then
  1921. for x,z in next, hit.Parent:children() do
  1922. if z:IsA'Humanoid' then
  1923. z:TakeDamage(math.random(666,666666));
  1924. end
  1925. end
  1926. end
  1927. end
  1928.  
  1929. Visual:Destroy();
  1930. break
  1931. end
  1932. end
  1933. end)()
  1934. end
  1935.  
  1936. lastTick = tick();
  1937. local db = false;
  1938. game:service'RunService'.RenderStepped:connect(function()
  1939. if Action == "DEAD" then return end;
  1940.  
  1941.  
  1942. if not Wrangler then
  1943. --//
  1944. --// AUTOMATED MODE, MOTION SENSOR WILL DETECT MOVEMENT
  1945. --//
  1946.  
  1947.  
  1948. --//
  1949. --// IF PLAYER USED WRANGLER, THERE IS A SHIELD WICH MUST BE REMOVED
  1950. --//
  1951.  
  1952. if (Storage:findFirstChild'Shield') then
  1953. Storage:findFirstChild'Shield':Destroy();
  1954. end
  1955.  
  1956. local LastTarget = Target;
  1957.  
  1958. --//
  1959. --// CHECK FOR NEARBY ENEMIES
  1960. --//
  1961. local Player = GetNearbyPlayer();
  1962. Target = Player;
  1963.  
  1964. --//
  1965. --// BEEP ON TARGET FOUND
  1966. --//
  1967. if (Target ~= LastTarget and Target ~= nil) then
  1968. Move.Pitch = 0.9 + math.random()/9;
  1969. Move:play();
  1970. OnFind:play();
  1971. Action = "Standby";
  1972. end
  1973.  
  1974. --//
  1975. --// IDLE
  1976. --//
  1977. if Action == "Idle" then
  1978. RotateAxisX.C1 = clerp(RotateAxisX.C1, CFrame.Angles(0, SharpSin(tick()*2)*.2, 0), .1);
  1979. RotateAxisY.C0 = clerp(RotateAxisY.C0, CFrame.new(), .1);
  1980. end
  1981.  
  1982.  
  1983. --//
  1984. --// SENTRY DEAD
  1985. --//
  1986.  
  1987. --//
  1988. --// IF PLAYER EXISTS, FIRE!
  1989. --//
  1990.  
  1991.  
  1992.  
  1993. if Action == "Standby" then
  1994. pcall(function()
  1995. local tor = Target.Torso.CFrame.p -- Target CFrame
  1996. local direction = InvisiBox.CFrame.lookVector -- Direction handling, welds mess up, just a workaround.
  1997. local heading = math.atan2(direction.x, direction.z)--
  1998. local RotY = math.deg(heading)
  1999. if RotY < 0 then
  2000. RotY = (360 - math.abs(RotY));
  2001. end
  2002. RotateAxisX.C1 = --Begin here
  2003. clerp(RotateAxisX.C1,
  2004. CFrame.new(
  2005.  
  2006. Vector3.new(), --The Pivot0 of pointing the weld.
  2007. Vector3.new(tor.x, 0, tor.z) - Vector3.new(RotateAxisX.Part1.CFrame.x, 0, RotateAxisX.Part1.CFrame.z)) --We point the sentry here
  2008.  
  2009. * CFrame.Angles(0, math.rad(360) - math.rad(RotY), 0),
  2010. .1
  2011. );
  2012.  
  2013. local Point = Hold.CFrame:toObjectSpace(CFrame.new(Hold.CFrame.p,tor))*CFrame.Angles(0,math.rad(180),0)
  2014. local RX, RY, RZ = Point:toEulerAnglesXYZ()
  2015. if math.deg(RX) > 45 then
  2016. RX = math.rad(45)
  2017. elseif math.deg(RX) < -55 then
  2018. RX = math.rad(-55)
  2019. end
  2020. RotateAxisY.C0 = clerp(RotateAxisY.C0,CFrame.Angles(RX,0,0),.1)
  2021.  
  2022. end)
  2023. end
  2024. if Action == "Fire" then
  2025. pcall(function()
  2026. local tor = Target.Torso.CFrame.p;
  2027. local direction = InvisiBox.CFrame.lookVector
  2028. local heading = math.atan2(direction.x, direction.z)
  2029. local RotY = math.deg(heading)
  2030. if RotY < 0 then
  2031. RotY = (360 - math.abs(RotY));
  2032. end
  2033. RotateAxisX.C1 = --Begin here
  2034. clerp(RotateAxisX.C1,
  2035. CFrame.new(
  2036.  
  2037. Vector3.new(), --The Pivot0 of pointing the weld.
  2038. Vector3.new(tor.x, 0, tor.z) - Vector3.new(RotateAxisX.Part1.CFrame.x, 0, RotateAxisX.Part1.CFrame.z)) --We point the sentry here
  2039.  
  2040. * CFrame.Angles(0, math.rad(360) - math.rad(RotY), 0),
  2041. .1
  2042. );
  2043.  
  2044. BarrelWeld.C0 = clerp(BarrelWeld.C0, CFrame.new())
  2045. local Point = Hold.CFrame:toObjectSpace(CFrame.new(Hold.CFrame.p,tor))*CFrame.Angles(0,math.rad(180),0)
  2046. local RX, RY, RZ = Point:toEulerAnglesXYZ()
  2047. if math.deg(RX) > 45 then
  2048. RX = math.rad(45)
  2049. elseif math.deg(RX) < -55 then
  2050. RX = math.rad(-55)
  2051. end
  2052. RotateAxisY.C0 = clerp(RotateAxisY.C0,CFrame.Angles(RX,0,0),.1)
  2053. end)
  2054. end
  2055.  
  2056. if (Target ~= nil) then
  2057. if Action == "Fire" or db then return end
  2058. if Action == "Standby" then
  2059. db = true
  2060. wait(.2);
  2061. end
  2062. Action = "Fire";
  2063. db = false
  2064. OnFire:play();
  2065.  
  2066. Particle.Color = ColorSequence.new(Colors[math.random(#Colors)]);
  2067.  
  2068. local PointLight = Instance.new("PointLight", Barrel);
  2069. PointLight.Color = Color3.new(1,.8,0)
  2070. PointLight.Brightness = 6;
  2071. Particle.Enabled = true
  2072. game:service'Debris':AddItem(PointLight, .05);
  2073.  
  2074.  
  2075.  
  2076. RayC(Barrel, 20)
  2077.  
  2078.  
  2079.  
  2080.  
  2081. wait(.1)
  2082. Particle.Enabled = false
  2083. if (Target ~= nil) then
  2084. Action = "Standby";
  2085. else
  2086. Action = "Idle";
  2087. end
  2088. end
  2089.  
  2090. if tick() - lastTick > 2.5 and Target == nil then
  2091. lastTick = tick();
  2092. Scanning:play();
  2093. end
  2094. end
  2095.  
  2096. if (Health.Health < 0.0001 or RotateAxisX.Parent == nil) then
  2097. Action = "DEAD";
  2098. if db then return end
  2099. RotateAxisY:Destroy();
  2100. TurretToFrame:Destroy();
  2101. Joint:Destroy();
  2102. InvisiBox2:Destroy();
  2103. db = true
  2104. local expl = Instance.new("Explosion", Storage);
  2105.  
  2106. expl.BlastRadius = .3;
  2107. expl.BlastPressure = 2050000;
  2108. expl.Position = TopFrame.Position;
  2109. Explode:Play()
  2110. NoSentry = true
  2111. game:service'Debris':AddItem(Storage, 3);
  2112.  
  2113. end
  2114.  
  2115. end)
  2116. end
  2117.  
  2118.  
  2119.  
  2120. combo = 0
  2121. function strike(hit)
  2122. if hit and hit.Parent and hit.Parent.Name ~= char.Name then
  2123. local targetHumanoid = hit.Parent:FindFirstChild("Humanoid")
  2124. if targetHumanoid and targetHumanoid ~= char:FindFirstChild("Humanoid") then
  2125. if combo == 1 then
  2126. targetHumanoid:TakeDamage(slashDamage)
  2127. SwingH:Play()
  2128.  
  2129. end
  2130.  
  2131.  
  2132.  
  2133. end
  2134. end
  2135. end
  2136.  
  2137.  
  2138.  
  2139. Reaper5.Touched:connect(strike)
  2140. --------------------------------------------------------------------------------------------------------------------------
  2141. function AnimSit()
  2142. for i = 0, 1, 0.05 do
  2143.  
  2144. swait()
  2145. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, -1, -.6) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2146. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2147. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.3, .1) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.1)
  2148. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(5)), 0.1)
  2149. RH.C0 = clerp(RH.C0, cn(1, -.4, -.4) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2150. LH.C0 = clerp(LH.C0, cn(-1, -1, -.6) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(60)), .1)
  2151. end
  2152.  
  2153. end
  2154.  
  2155. function AnimSitHit1()
  2156. for i = 0, 1, 0.05 do
  2157.  
  2158. swait()
  2159. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, -1, -.6) * angles(math.rad(10), math.rad(0), math.rad(0)), .1)
  2160. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
  2161. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.3, .1) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.1)
  2162. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(170), math.rad(0), math.rad(-5)), 0.08)
  2163. RH.C0 = clerp(RH.C0, cn(1, -.4, -.4) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(10)), .1)
  2164. LH.C0 = clerp(LH.C0, cn(-1, -1, -.6) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(50)), .1)
  2165. end
  2166.  
  2167. end
  2168.  
  2169.  
  2170. function AnimSitHit2()
  2171. for i = 0, 1, 0.05 do
  2172.  
  2173. swait()
  2174. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, -1, -.6) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2175. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(15), math.rad(0), math.rad(0)), .1)
  2176. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.3, .1) * angles(math.rad(20), math.rad(0), math.rad(20)), 0.1)
  2177. RW.C0 = clerp(RW.C0, CFrame.new(1.55, 0.4, -.1) * angles(math.rad(40), math.rad(3 ), math.rad(-15)), 0.3)
  2178. RH.C0 = clerp(RH.C0, cn(1, -.4, -.4) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2179. LH.C0 = clerp(LH.C0, cn(-1, -1, -.6) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(60)), .1)
  2180. end
  2181.  
  2182. end
  2183. --------------------------------------------------------------------------------------------------------------------------
  2184.  
  2185. function No1()
  2186. for i = 0, 1, 0.05 do
  2187.  
  2188. swait()
  2189. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2190. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(30), math.rad(0), math.rad(40)), .1)
  2191. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
  2192. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
  2193. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2194. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2195. end
  2196.  
  2197. end
  2198.  
  2199.  
  2200.  
  2201. function No2()
  2202. for i = 0, 1, 0.05 do
  2203.  
  2204. swait()
  2205. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2206. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-40)), .1)
  2207. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
  2208. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
  2209. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2210. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2211. end
  2212.  
  2213. end
  2214.  
  2215.  
  2216.  
  2217. --------------------------------------------------------------------------------------------------------------------------
  2218.  
  2219. function Yes1()
  2220. for i = 0, 1, 0.1 do
  2221.  
  2222. swait()
  2223. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2224. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(25), math.rad(0), math.rad(0)), .1)
  2225. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
  2226. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
  2227. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2228. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2229. end
  2230.  
  2231. end
  2232.  
  2233.  
  2234.  
  2235. function Yes2()
  2236. for i = 0, 1, 0.1 do
  2237.  
  2238. swait()
  2239. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0,0,0) * angles(math.rad(0), math.rad(0), math.rad(0)), .1)
  2240. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  2241. LW.C0 = clerp(LW.C0, CFrame.new(-1.3, 0.5, -.1) * angles(math.rad(0), math.rad(0), math.rad(0)), 0.1)
  2242. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(30), math.rad(0), math.rad(0)), 0.1)
  2243. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2244. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(0)), .1)
  2245. end
  2246.  
  2247. end
  2248.  
  2249.  
  2250.  
  2251. --------------------------------------------------------------------------------------------------------------------------
  2252. function AttackAnim1()
  2253. for i = 0, 1, 0.05 do
  2254. swait()
  2255. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .1)
  2256. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
  2257. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(170), math.rad(0), math.rad(10)), 0.08)
  2258. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(40), math.rad(0), math.rad(10)), 0.3)
  2259. if Torsovelocity > 2 then
  2260. 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)
  2261. 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)
  2262. elseif Torsovelocity < 1 then
  2263. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(-5)), .1)
  2264. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(5)), .1)
  2265. end
  2266. end
  2267. end
  2268.  
  2269.  
  2270. function AttackAnim2()
  2271. for i = 0, 1, 0.05 do
  2272. swait()
  2273. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(5), math.rad(0), math.rad(0)), .2)
  2274. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5), math.rad(0), math.rad(0)), .1)
  2275. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -.1) * angles(math.rad(5), math.rad(10), math.rad(-10)), 0.25)
  2276. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(20), math.rad(0), math.rad(10)), 0.3)
  2277. if Torsovelocity > 2 then
  2278. 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)
  2279. 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)
  2280.  
  2281. elseif Torsovelocity < 1 then
  2282. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(5), math.rad(5)), .1)
  2283. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(5), math.rad(-5)), .1)
  2284. end
  2285. end
  2286. end
  2287. --------------------------------------------------------------------------------------------------------------------------
  2288.  
  2289.  
  2290.  
  2291. function ShotAttackAnim1()
  2292. for i = 0, 1, 0.07 do
  2293. swait()
  2294.  
  2295. if Torsovelocity > 2 then
  2296. 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)
  2297. 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)
  2298. 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)
  2299. 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)
  2300. 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)
  2301. 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)
  2302.  
  2303.  
  2304.  
  2305. elseif Torsovelocity < 1 then
  2306.  
  2307.  
  2308. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
  2309. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
  2310. 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)
  2311. 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)
  2312. 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)
  2313. 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)
  2314.  
  2315.  
  2316. end
  2317. end
  2318. end
  2319.  
  2320.  
  2321.  
  2322.  
  2323.  
  2324. function ShotAttackAnim2()
  2325. for i = 0, 1, 0.05 do
  2326. swait()
  2327.  
  2328. if Torsovelocity > 2 then
  2329. 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)
  2330. 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)
  2331. 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)
  2332. 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)
  2333. 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)
  2334. 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)
  2335.  
  2336.  
  2337.  
  2338. elseif Torsovelocity < 1 then
  2339.  
  2340.  
  2341. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
  2342. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
  2343. 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)
  2344. 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)
  2345. 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)
  2346. 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)
  2347.  
  2348.  
  2349. end
  2350. end
  2351. end
  2352.  
  2353.  
  2354.  
  2355. function ShotAttackAnim3()
  2356. for i = 0, 1, 0.05 do
  2357. swait()
  2358.  
  2359. if Torsovelocity > 2 then
  2360. 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)
  2361. 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)
  2362. 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)
  2363. 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)
  2364. 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)
  2365. 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)
  2366.  
  2367.  
  2368.  
  2369. elseif Torsovelocity < 1 then
  2370.  
  2371.  
  2372. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
  2373. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
  2374. 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)
  2375. 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)
  2376. 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)
  2377. 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)
  2378.  
  2379.  
  2380. end
  2381. end
  2382. end
  2383.  
  2384. function ShotAttackAnim4()
  2385. for i = 0, 1, 0.05 do
  2386. swait()
  2387.  
  2388. if Torsovelocity > 2 then
  2389. 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)
  2390. 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)
  2391. 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)
  2392. 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)
  2393. 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)
  2394. 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)
  2395.  
  2396.  
  2397.  
  2398. elseif Torsovelocity < 1 then
  2399.  
  2400.  
  2401. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-50)), .2)
  2402. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(50)), .2)
  2403. 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)
  2404. 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)
  2405. 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)
  2406. 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)
  2407.  
  2408.  
  2409. end
  2410. end
  2411. end
  2412. --------------------------------------------------------------------------------------------------------------------------
  2413.  
  2414. function DanAni1()
  2415. for i = 0, .8, 0.05 + MusThingHat.Mesh.Scale.Y*0.025 do
  2416.  
  2417. swait()
  2418. 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)
  2419. 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)
  2420. 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)
  2421. 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)
  2422. 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)
  2423. 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)
  2424. end
  2425.  
  2426. end
  2427.  
  2428.  
  2429.  
  2430. function DanAni2()
  2431. for i = 0, .8, 0.05 + MusThingHat.Mesh.Scale.Y*0.025 do
  2432.  
  2433. swait()
  2434. 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)
  2435. 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)
  2436. 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)
  2437. 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)
  2438. 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)
  2439. 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)
  2440. end
  2441.  
  2442.  
  2443. end
  2444.  
  2445.  
  2446.  
  2447. --------------------------------------------------------------------------------------------------------------------------
  2448.  
  2449. BuildNow = false
  2450.  
  2451. Shotuse = false
  2452.  
  2453. wait2 = false
  2454.  
  2455. mouse.KeyDown:connect(function(key)
  2456.  
  2457. if key == "g" and attack == false then
  2458. yes:Play()
  2459. humanoid.WalkSpeed = 0
  2460. attack = true
  2461. Yes1()
  2462. Yes2()
  2463. Yes1()
  2464. Yes2()
  2465. attack = false
  2466. humanoid.WalkSpeed = 16
  2467. end
  2468. end)
  2469.  
  2470.  
  2471. mouse.KeyDown:connect(function(key)
  2472. if key == "e" and attack == false then
  2473. if Wep == 1 then
  2474. Wep = 2
  2475. else
  2476. Wep = 1
  2477. end
  2478.  
  2479.  
  2480. end
  2481. end)
  2482.  
  2483. mouse.KeyDown:connect(function(key)
  2484. if key == "p" and attack == false then
  2485.  
  2486. Wep = 3
  2487.  
  2488.  
  2489.  
  2490. end
  2491. end)
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504. equippedgun = true
  2505.  
  2506.  
  2507.  
  2508.  
  2509. coroutine.wrap(function()
  2510. while equippedgun do
  2511.  
  2512. if spread < 0 then spread = 0 end
  2513. if humanoid.Health == 0 then break end
  2514.  
  2515.  
  2516. game:service'RunService'.Stepped:wait()
  2517. end
  2518. end)()
  2519.  
  2520. mouse.Button1Down:connect(function()
  2521. if debounce then return end
  2522. if equippedgun2 == true and attack == false then
  2523. Shotuse = true
  2524. debounce = true
  2525.  
  2526. wait(.2)
  2527.  
  2528. sound:play()
  2529.  
  2530.  
  2531.  
  2532. coroutine.wrap(function()
  2533. wait(0.3)
  2534. for angle = 0, 4 do
  2535.  
  2536. wait()
  2537. end
  2538.  
  2539. wait(0.2)
  2540. sound2:play()
  2541.  
  2542.  
  2543. wait(0.1)
  2544. for move = 0, 3 do
  2545. if move > 2 then return end
  2546.  
  2547.  
  2548. wait(0.06)
  2549. end
  2550. end)()
  2551. spread = spread + 1
  2552. coroutine.wrap(function()
  2553. for bullitz = 0, 7 do
  2554. if bullitz > 6 then return end
  2555. rayCast2(300, 1, Reaper4)
  2556. GunParticle.Enabled = true
  2557. local PointLight = Instance.new("PointLight", Reaper4);
  2558. PointLight.Color = Color3.new(.2,.2,0)
  2559. PointLight.Brightness = 2;
  2560. game:service'Debris':AddItem(PointLight, .05);
  2561. end
  2562. end)()
  2563. coroutine.wrap(function()
  2564. for _ = 0, 50 do
  2565. pcall(function()
  2566. spread = spread - 0.03
  2567. end)
  2568. wait()
  2569. end
  2570. end)()
  2571. wait(1)
  2572. debounce = false
  2573. end
  2574.  
  2575. end)
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583.  
  2584.  
  2585. mouse.Button1Down:connect(function(key)
  2586.  
  2587. if attack == false and Wep == 1 then
  2588. attack = true
  2589.  
  2590. AttackAnim1()
  2591. combo = 1
  2592. Swing:Play()
  2593. AttackAnim2()
  2594. attack = false
  2595. combo = 0
  2596. end
  2597. end)
  2598.  
  2599.  
  2600.  
  2601. mouse.KeyDown:connect(function(key)
  2602.  
  2603. if key == "f" and attack == false then
  2604. No:Play()
  2605. humanoid.WalkSpeed = 0
  2606. attack = true
  2607. No1()
  2608. No2()
  2609. attack = false
  2610. humanoid.WalkSpeed = 16
  2611. end
  2612. end)
  2613.  
  2614.  
  2615.  
  2616.  
  2617. mouse.KeyDown:connect(function(key)
  2618. if attack == false or DA == true then
  2619. if key == "r" and Wep == 3 then
  2620.  
  2621. if DA == false then
  2622. DA = true
  2623. RUS:Play()
  2624. attack=true
  2625. humanoid.WalkSpeed = 0
  2626. else
  2627. DA = false
  2628. RUS:Stop()
  2629. attack=false
  2630. humanoid.WalkSpeed = 16
  2631. end
  2632. end
  2633. end
  2634. end)
  2635.  
  2636.  
  2637.  
  2638. mouse.KeyDown:connect(function(key)
  2639.  
  2640. if key == "t" and attack == false then
  2641. Taunt:Play()
  2642. humanoid.WalkSpeed = 0
  2643. attack = true
  2644. No1()
  2645. Yes2()
  2646. attack = false
  2647. humanoid.WalkSpeed = 16
  2648. end
  2649. end)
  2650.  
  2651. mouse.KeyDown:connect(function(key)
  2652. if key == "z" then
  2653.  
  2654.  
  2655.  
  2656. if NoSentry == false and attack == false and wait2 == false then
  2657. wait2 = true
  2658. for i,v in pairs(script:children()) do
  2659. if (v:IsA'Model') then
  2660.  
  2661.  
  2662. for i,v in pairs(v:children()) do
  2663. if (v:IsA'Humanoid') then
  2664. v.Health = 0
  2665. end
  2666. end
  2667.  
  2668.  
  2669. end
  2670.  
  2671. NoSentry = true
  2672.  
  2673. end
  2674.  
  2675.  
  2676.  
  2677. end
  2678.  
  2679.  
  2680.  
  2681. if NoSentry == true and attack == false and wait2 == false and Wep == 1 then
  2682. attack = true
  2683. wait2 = true
  2684. humanoid.WalkSpeed = 0
  2685. AnimSit()
  2686. AnimSitHit1()
  2687. WSH = WSHM[math.random(1,#WSHM)]
  2688. HitM.SoundId = "rbxassetid://"..WSH
  2689. HitM:Play()
  2690. BuildNow = true
  2691. AnimSitHit2()
  2692. AnimSitHit1()
  2693. WSH = WSHM[math.random(1,#WSHM)]
  2694. HitM.SoundId = "rbxassetid://"..WSH
  2695. HitM:Play()
  2696. AnimSitHit2()
  2697. AnimSitHit1()
  2698. WSH = WSHM[math.random(1,#WSHM)]
  2699. HitM.SoundId = "rbxassetid://"..WSH
  2700. HitM:Play()
  2701. AnimSitHit2()
  2702. AnimSitHit1()
  2703. WSH = WSHM[math.random(1,#WSHM)]
  2704. HitM.SoundId = "rbxassetid://"..WSH
  2705. HitM:Play()
  2706. AnimSitHit2()
  2707. AnimSitHit1()
  2708. WSH = WSHM[math.random(1,#WSHM)]
  2709. HitM.SoundId = "rbxassetid://"..WSH
  2710. HitM:Play()
  2711. AnimSitHit2()
  2712. AnimSitHit1()
  2713. WSH = WSHM[math.random(1,#WSHM)]
  2714. HitM.SoundId = "rbxassetid://"..WSH
  2715. HitM:Play()
  2716. AnimSitHit2()
  2717. AnimSitHit1()
  2718. WSH = WSHM[math.random(1,#WSHM)]
  2719. HitM.SoundId = "rbxassetid://"..WSH
  2720. HitM:Play()
  2721. AnimSitHit2()
  2722. AnimSitHit1()
  2723. WSH = WSHM[math.random(1,#WSHM)]
  2724. HitM.SoundId = "rbxassetid://"..WSH
  2725. HitM:Play()
  2726. AnimSitHit2()
  2727. AnimSitHit1()
  2728. WSH = WSHM[math.random(1,#WSHM)]
  2729. HitM.SoundId = "rbxassetid://"..WSH
  2730. HitM:Play()
  2731. AnimSitHit2()
  2732. AnimSitHit1()
  2733. WSH = WSHM[math.random(1,#WSHM)]
  2734. HitM.SoundId = "rbxassetid://"..WSH
  2735. HitM:Play()
  2736. AnimSitHit2()
  2737. AnimSit()
  2738.  
  2739. humanoid.WalkSpeed = 16
  2740. attack = false
  2741. NoSentry = false
  2742.  
  2743. end
  2744. wait()
  2745.  
  2746. wait2 = false
  2747. end end)
  2748.  
  2749.  
  2750.  
  2751. humanoid.Died:connect(function()
  2752. Arms:Destroy()
  2753. end)
  2754.  
  2755. print([[
  2756.  
  2757.  
  2758. ----------------------------------------
  2759. Tf2 Engineer Class
  2760. ----------------------------------------
  2761. Script by: 123jl123
  2762. Sentry by: Madiik
  2763. TheBoozled gave me a Mesh and Sounds from tf2
  2764. ----------------------------------------
  2765. Dont leak and dont do it.....
  2766. ----------------------------------------
  2767. ]])
  2768.  
  2769. game:GetService("RunService"):BindToRenderStep("ew", 0, function()
  2770. MusThingHat.Mesh.Scale = Vector3.new(MusThingHat.Mesh.Scale.X, RUS.PlaybackLoudness / 160, MusThingHat.Mesh.Scale.Z)
  2771. end)
  2772.  
  2773. local mesh1anan = Instance.new("SpecialMesh")
  2774. mesh1anan.MeshType = Enum.MeshType.FileMesh
  2775.  
  2776. mesh1anan.MeshId = "http://www.roblox.com/asset/?id=16657069"
  2777. mesh1anan.TextureId = "http://www.roblox.com/asset/?id=571107659"
  2778. mesh1anan.Scale = Vector3.new(5,5,5)
  2779. Glow1 = Color3.new(1,1,1)
  2780. Glow2 = Color3.new(0,0,0)
  2781.  
  2782. GlowParticle = Instance.new("ParticleEmitter")
  2783. GlowParticle.LightEmission = 1
  2784.  
  2785. GlowParticle.Size = NumberSequence.new(0,2)
  2786. GlowParticle.Texture = "http://www.roblox.com/asset/?id=52620985"
  2787. GlowParticle.Transparency = NumberSequence.new(0,1)
  2788. GlowParticle.LockedToPart = false
  2789. GlowParticle.Lifetime = NumberRange.new(0.5)
  2790. GlowParticle.Rate= 25
  2791. GlowParticle.Speed =NumberRange.new(0)
  2792.  
  2793.  
  2794. function RainDucks()
  2795. local locationanan = char.Torso.CFrame
  2796. local tacoa = Instance.new("Part")
  2797. tacoa.Size = Vector3.new(.5,.5,.5)
  2798. tacoa.CanCollide = false
  2799. tacoa.RotVelocity = Vector3.new(math.random(0,6),math.random(0,6),math.random(0,6))
  2800. local meshanananan = mesh1anan:clone()
  2801. meshanananan.Parent = tacoa
  2802. meshanananan.Scale = Vector3.new(1,1,1)
  2803. tacoa.CFrame = locationanan * CFrame.new(math.random(-8,8),math.random(10,40),math.random(-8,8))
  2804. tacoa.Parent = workspace
  2805.  
  2806.  
  2807. game:GetService("Debris"):AddItem(tacoa,4)
  2808. local GP = GlowParticle:clone()
  2809. GP.Parent = tacoa
  2810. Glow1 = Color3.new(math.random(), math.random(), math.random())
  2811. GP.Color = ColorSequence.new(Glow1,Glow2)
  2812.  
  2813. end
  2814.  
  2815.  
  2816.  
  2817. --]]
  2818.  
  2819.  
  2820.  
  2821. while true do wait()
  2822. if BuildNow == true then
  2823. BuildNow = false
  2824.  
  2825. BuildSentry()
  2826. end
  2827. if Shotuse == true then
  2828. Shotuse = false
  2829. attack = true
  2830. ShotAttackAnim1()
  2831. GunParticle.Enabled = false
  2832. ShotAttackAnim2()
  2833. ShotAttackAnim3()
  2834. ShotAttackAnim4()
  2835. ShotAttackAnim3()
  2836. attack = false
  2837. end
  2838.  
  2839.  
  2840.  
  2841.  
  2842. if DA == true then
  2843. DanAni1()
  2844. RainDucks()
  2845. local PointLight = Instance.new("PointLight", Torso);
  2846. PointLight.Color = Color3.new(math.random(), math.random(), math.random())
  2847. PointLight.Brightness = 50;
  2848. PointLight.Range = MusThingHat.Mesh.Scale.Y*10;
  2849. game:service'Debris':AddItem(PointLight, .3);
  2850.  
  2851. DanAni2()
  2852. RainDucks()
  2853. local PointLight = Instance.new("PointLight", Torso);
  2854. PointLight.Color = Color3.new(math.random(), math.random(), math.random())
  2855. PointLight.Brightness = 50;
  2856. PointLight.Range = MusThingHat.Mesh.Scale.Y*10;
  2857. game:service'Debris':AddItem(PointLight, .3);
  2858.  
  2859.  
  2860.  
  2861. end
  2862.  
  2863.  
  2864.  
  2865.  
  2866.  
  2867.  
  2868. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement