Advertisement
Kaemi

Tc2 Mechanic

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