Advertisement
Orangeplayer1431

engineer finally

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