HuyEvilDumb

Untitled

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