Advertisement
VorLex

DaNoob Engineer

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