Advertisement
HenloMyDude

engineer fe

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