Advertisement
Gametoy

Untitled

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