Advertisement
Mr-Shadow_Cat

Engie

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