Advertisement
Guest User

Furious Engineer

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