Advertisement
omg12

Engi

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