Advertisement
VorLex

Furious Engineer

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