Advertisement
Plug_RBLX

wtf?

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