scriptshocasereditor

Untitled

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