Advertisement
samuelrichter66

tf2 engi

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