Advertisement
codemen

Engiener script [roblox]

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