Advertisement
Guest User

FE Soldier AI

a guest
Dec 3rd, 2021
9,022
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 61.86 KB | None | 0 0
  1. -- Fe Soldier AI [Free Version] Edit by HelloMyFrlen3
  2.  
  3. --[[ {<HATS NEEDED>}
  4. https://www.roblox.com/catalog/617605556/Medieval-Hood-of-Mystery
  5.  
  6. https://www.roblox.com/catalog/6470135113/Fan-Hand-Sign-Why-Dont-We-WDW
  7.  
  8. https://www.roblox.com/catalog/48474313/Red-Roblox-Cap
  9.  
  10. https://www.roblox.com/catalog/4391384843/International-Fedora-Russia
  11.  
  12. https://www.roblox.com/catalog/48474294/ROBLOX-Girl-Hair
  13.  
  14. https://www.roblox.com/catalog/62724852/Chestnut-Bun
  15.  
  16. https://www.roblox.com/catalog/451220849/Lavender-Updo
  17.  
  18. https://www.roblox.com/catalog/63690008/Pal-Hair
  19.  
  20. https://www.roblox.com/catalog/62234425/Brown-Hair
  21. ]]
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29. FakeLimbs = {["Head"] = nil,["Torso1"] = nil,["Torso2"] = nil,["Right Arm"] = nil,["Left Arm"] = nil,["Right Leg"] = nil,["Left Leg"] = nil}
  30. Accessorys = {}
  31.  
  32. local ModelsRequire = game:GetObjects("rbxassetid://8005457125")
  33. local MFolder = ModelsRequire[1]
  34.  
  35.  
  36. local HumanRoot = game.Players.LocalPlayer.Character.HumanoidRootPart
  37. function StickAcc(Part0,Part1,Angle,Position)
  38. Part0:FindFirstChildWhichIsA("Weld"):Destroy()
  39. local AlignPos = Instance.new('AlignPosition', Part1)
  40. AlignPos.ApplyAtCenterOfMass = true;
  41. AlignPos.MaxForce = 67752;
  42. AlignPos.MaxVelocity = math.huge/9e110;
  43. AlignPos.ReactionForceEnabled = false;
  44. AlignPos.Responsiveness = 200;
  45. AlignPos.RigidityEnabled = false;
  46. local AlignOri = Instance.new('AlignOrientation', Part1)
  47. AlignOri.MaxAngularVelocity = math.huge/9e110;
  48. AlignOri.MaxTorque = 67752;
  49. AlignOri.PrimaryAxisOnly = false;
  50. AlignOri.ReactionTorqueEnabled = false;
  51. AlignOri.Responsiveness = 200;
  52. AlignOri.RigidityEnabled = false;
  53. local AttachmentA=Instance.new('Attachment',Part1)
  54. local AttachmentB=Instance.new('Attachment',Part0)
  55. local AttachmentC=Instance.new('Attachment',Part1)
  56. local AttachmentD=Instance.new('Attachment',Part0)
  57. AlignPos.Attachment1 = AttachmentA;
  58. AlignPos.Attachment0 = AttachmentB;
  59. AlignOri.Attachment1 = AttachmentC;
  60. AlignOri.Attachment0 = AttachmentD;
  61. AttachmentC.Orientation = Angle
  62. Part0.Parent = FakeCharacter
  63. if Position then
  64. AttachmentA.Position = Position
  65. end
  66. game:GetService("RunService").Heartbeat:connect(function()
  67. Part0.Velocity = Vector3.new(0,35,0)
  68. end)
  69. end
  70.  
  71. function StickParts(Part0,Part1,Angle,Position)
  72. Part0:FindFirstChildWhichIsA("Weld"):Destroy()
  73. Part0:FindFirstChildWhichIsA("SpecialMesh"):Destroy()
  74. local AlignPos = Instance.new('AlignPosition', Part1)
  75. AlignPos.ApplyAtCenterOfMass = true;
  76. AlignPos.MaxForce = 67752;
  77. AlignPos.MaxVelocity = math.huge/9e110;
  78. AlignPos.ReactionForceEnabled = false;
  79. AlignPos.Responsiveness = 200;
  80. AlignPos.RigidityEnabled = false;
  81. local AlignOri = Instance.new('AlignOrientation', Part1)
  82. AlignOri.MaxAngularVelocity = math.huge/9e110;
  83. AlignOri.MaxTorque = 67752;
  84. AlignOri.PrimaryAxisOnly = false;
  85. AlignOri.ReactionTorqueEnabled = false;
  86. AlignOri.Responsiveness = 200;
  87. AlignOri.RigidityEnabled = false;
  88. local AttachmentA=Instance.new('Attachment',Part1)
  89. local AttachmentB=Instance.new('Attachment',Part0)
  90. local AttachmentC=Instance.new('Attachment',Part1)
  91. local AttachmentD=Instance.new('Attachment',Part0)
  92. AlignPos.Attachment1 = AttachmentA;
  93. AlignPos.Attachment0 = AttachmentB;
  94. AlignOri.Attachment1 = AttachmentC;
  95. AlignOri.Attachment0 = AttachmentD;
  96. AttachmentC.Orientation = Angle
  97. AttachmentC.Name = "Orientation"
  98. Part0.Parent = FakeCharacter
  99. if Position then
  100. AttachmentA.Position = Position
  101. end
  102. s = game:GetService("RunService").Heartbeat:connect(function()
  103. Part0.Velocity = Vector3.new(0,50,0)
  104. end)
  105. spawn(function()
  106. while true do
  107. wait()
  108. if HumanDied then
  109. s:Disconnect()
  110. break
  111. end
  112. end
  113. end)
  114. end
  115.  
  116.  
  117. for i, part in pairs(game.Players.LocalPlayer.Character:GetDescendants()) do
  118. if part:IsA("Accessory") then
  119. if part.Handle.Size == Vector3.new(1, 1, 2) then
  120. if FakeLimbs["Right Arm"] == nil then
  121. FakeLimbs["Right Arm"] = part.Handle
  122. elseif FakeLimbs["Left Arm"] == nil then
  123. FakeLimbs["Left Arm"] = part.Handle
  124.  
  125. elseif FakeLimbs["Right Leg"] == nil then
  126. FakeLimbs["Right Leg"] = part.Handle
  127. elseif FakeLimbs["Left Leg"] == nil then
  128. FakeLimbs["Left Leg"] = part.Handle
  129. elseif FakeLimbs["Torso1"] == nil then
  130. FakeLimbs["Torso1"] = part.Handle
  131. elseif FakeLimbs["Torso2"] == nil then
  132. FakeLimbs["Torso2"] = part.Handle
  133. end
  134. elseif part.Handle.Size == Vector3.new(1,1,1) then
  135. FakeLimbs["Head"] = part.Handle
  136. end
  137. end
  138. end
  139. game.Players.LocalPlayer.Character.Archivable = true
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154. -- Kill Player
  155. FakeCharacter = MFolder
  156. FakeCharacter.Parent = workspace
  157.  
  158. local m4 = FakeCharacter.M4
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171. do
  172.  
  173.  
  174.  
  175. Bypass = "death"
  176. if not Bypass then Bypass = "limbs" end
  177. HumanDied = false
  178.  
  179. CountSCIFIMOVIELOL = 1
  180. function SCIFIMOVIELOL(Part0,Part1,Position,Angle)
  181. local AlignPos = Instance.new('AlignPosition', Part1); AlignPos.Name = "AliP_"..CountSCIFIMOVIELOL
  182. AlignPos.ApplyAtCenterOfMass = true;
  183. AlignPos.MaxForce = 67752;
  184. AlignPos.MaxVelocity = math.huge/9e110;
  185. AlignPos.ReactionForceEnabled = false;
  186. AlignPos.Responsiveness = 200;
  187. AlignPos.RigidityEnabled = false;
  188. local AlignOri = Instance.new('AlignOrientation', Part1); AlignOri.Name = "AliO_"..CountSCIFIMOVIELOL
  189. AlignOri.MaxAngularVelocity = math.huge/9e110;
  190. AlignOri.MaxTorque = 67752;
  191. AlignOri.PrimaryAxisOnly = false;
  192. AlignOri.ReactionTorqueEnabled = false;
  193. AlignOri.Responsiveness = 200;
  194. AlignOri.RigidityEnabled = false;
  195. local AttachmentA=Instance.new('Attachment',Part1); AttachmentA.Name = "AthP_"..CountSCIFIMOVIELOL
  196. local AttachmentB=Instance.new('Attachment',Part0); AttachmentB.Name = "AthP_"..CountSCIFIMOVIELOL
  197. local AttachmentC=Instance.new('Attachment',Part1); AttachmentC.Name = "AthO_"..CountSCIFIMOVIELOL
  198. local AttachmentD=Instance.new('Attachment',Part0); AttachmentD.Name = "AthO_"..CountSCIFIMOVIELOL
  199. AttachmentC.Orientation = Angle
  200. AttachmentA.Position = Position
  201.  
  202. AttachmentC.Name = "Orientation"
  203.  
  204. AlignPos.Attachment1 = AttachmentA;
  205. AlignPos.Attachment0 = AttachmentB;
  206. AlignOri.Attachment1 = AttachmentC;
  207. AlignOri.Attachment0 = AttachmentD;
  208. CountSCIFIMOVIELOL = CountSCIFIMOVIELOL + 1
  209. game:GetService("RunService").Heartbeat:connect(function()
  210. Part0.Velocity = Vector3.new(0,35,0)
  211. end)
  212. end
  213.  
  214. coroutine.wrap(function()
  215. local player = game.Players.LocalPlayer
  216. local char = player.Character or player.CharacterAdded:wait()
  217. if sethiddenproperty then
  218. while true do
  219. game:GetService("RunService").RenderStepped:Wait()
  220. settings().Physics.AllowSleep = false
  221. local TBL = game:GetService("Players"):GetChildren()
  222. for _ = 1,#TBL do local Players = TBL[_]
  223. if Players ~= game:GetService("Players").LocalPlayer then
  224. Players.MaximumSimulationRadius = 0
  225. sethiddenproperty(Players,"SimulationRadius",0)
  226. end
  227. end
  228. game:GetService("Players").LocalPlayer.MaximumSimulationRadius = math.pow(math.huge,math.huge)
  229. sethiddenproperty(game:GetService("Players").LocalPlayer,"SimulationRadius",math.pow(math.huge,math.huge)*math.huge)
  230. if HumanDied then break end
  231. end
  232. else
  233. while true do
  234. game:GetService("RunService").RenderStepped:Wait()
  235. settings().Physics.AllowSleep = false
  236. local TBL = game:GetService("Players"):GetChildren()
  237. for _ = 1,#TBL do local Players = TBL[_]
  238. if Players ~= game:GetService("Players").LocalPlayer then
  239. Players.MaximumSimulationRadius = 0
  240. end
  241. end
  242. game:GetService("Players").LocalPlayer.MaximumSimulationRadius = math.pow(math.huge,math.huge)
  243. if HumanDied then break end
  244. end
  245. end
  246. end)()
  247.  
  248. if game:GetService("Players").LocalPlayer.Character.Humanoid.RigType == Enum.HumanoidRigType.R6 then
  249. if Bypass == "limbs" then --------------------------------------------------------------------------------------------------------------------
  250. game:GetService("Players").LocalPlayer["Character"].Archivable = true
  251. local CloneChar = game:GetService("Players").LocalPlayer["Character"]:Clone()
  252. CloneChar.Parent = workspace
  253. CloneChar.HumanoidRootPart.CFrame = game:GetService("Players").LocalPlayer["Character"].HumanoidRootPart.CFrame * CFrame.new(0,2,0)
  254. wait()
  255. CloneChar.Humanoid.BreakJointsOnDeath = false
  256. workspace.Camera.CameraSubject = CloneChar.Humanoid
  257. CloneChar.Name = "non"
  258. CloneChar.Humanoid.DisplayDistanceType = "None"
  259. if CloneChar.Head:FindFirstChild("face") then CloneChar.Head:FindFirstChild("face"):Destroy() end
  260. if workspace[game:GetService("Players").LocalPlayer.Name].Head:FindFirstChild("face") then workspace[game:GetService("Players").LocalPlayer.Name].Head:FindFirstChild("face").Parent = CloneChar.Head end
  261.  
  262. local DeadChar = workspace[game:GetService("Players").LocalPlayer.Name]
  263. DeadChar.HumanoidRootPart:Destroy()
  264.  
  265. local LVecPart = Instance.new("Part", workspace) LVecPart.CanCollide = false LVecPart.Transparency = 1
  266. local CONVEC
  267. local function VECTORUNIT()
  268. if HumanDied then CONVEC:Disconnect(); return end
  269. local lookVec = workspace.Camera.CFrame.lookVector
  270. local Root = CloneChar["HumanoidRootPart"]
  271. LVecPart.Position = Root.Position
  272. LVecPart.CFrame = CFrame.new(LVecPart.Position, Vector3.new(lookVec.X * 9999, lookVec.Y, lookVec.Z * 9999))
  273. end
  274. CONVEC = game:GetService("RunService").Heartbeat:Connect(VECTORUNIT)
  275.  
  276. local CONDOWN
  277. local WDown, ADown, SDown, DDown, SpaceDown = false, false, false, false, false
  278. local function KEYDOWN(_,Processed)
  279. if HumanDied then CONDOWN:Disconnect(); return end
  280. if Processed ~= true then
  281. local Key = _.KeyCode
  282. if Key == Enum.KeyCode.W then
  283. WDown = true end
  284. if Key == Enum.KeyCode.A then
  285. ADown = true end
  286. if Key == Enum.KeyCode.S then
  287. SDown = true end
  288. if Key == Enum.KeyCode.D then
  289. DDown = true end
  290. if Key == Enum.KeyCode.Space then
  291. SpaceDown = true end end end
  292. CONDOWN = game:GetService("UserInputService").InputBegan:Connect(KEYDOWN)
  293.  
  294. local CONUP
  295. local function KEYUP(_)
  296. if HumanDied then CONUP:Disconnect(); return end
  297. local Key = _.KeyCode
  298. if Key == Enum.KeyCode.W then
  299. WDown = false end
  300. if Key == Enum.KeyCode.A then
  301. ADown = false end
  302. if Key == Enum.KeyCode.S then
  303. SDown = false end
  304. if Key == Enum.KeyCode.D then
  305. DDown = false end
  306. if Key == Enum.KeyCode.Space then
  307. SpaceDown = false end end
  308. CONUP = game:GetService("UserInputService").InputEnded:Connect(KEYUP)
  309.  
  310. local function MoveClone(X,Y,Z)
  311. VEL = 1
  312. LVecPart.CFrame = LVecPart.CFrame * CFrame.new(-X,Y,-Z)
  313. workspace["non"].Humanoid.WalkToPoint = LVecPart.Position
  314. wait()
  315. VEL = 0
  316. end
  317.  
  318. coroutine.wrap(function()
  319. while true do game:GetService("RunService").RenderStepped:Wait()
  320. if HumanDied then break end
  321. if WDown then MoveClone(0,0,1e4) end
  322. if ADown then MoveClone(1e4,0,0) end
  323. if SDown then MoveClone(0,0,-1e4) end
  324. if DDown then MoveClone(-1e4,0,0) end
  325. if SpaceDown then CloneChar["Humanoid"].Jump = true end
  326. if WDown ~= true and ADown ~= true and SDown ~= true and DDown ~= true then
  327. workspace["non"].Humanoid.WalkToPoint = workspace["non"].HumanoidRootPart.Position end
  328. end
  329. end)()
  330.  
  331. local con
  332. function UnCollide()
  333. if HumanDied then con:Disconnect(); return end
  334. for _,Parts in next, CloneChar:GetDescendants() do
  335. if Parts:IsA("BasePart") then
  336. Parts.CanCollide = false
  337. end
  338. end
  339. for _,Parts in next, DeadChar:GetDescendants() do
  340. if Parts:IsA("BasePart") then
  341. Parts.CanCollide = false
  342. end
  343. end
  344. end
  345. con = game:GetService("RunService").Stepped:Connect(UnCollide)
  346.  
  347. local resetBindable = Instance.new("BindableEvent")
  348. resetBindable.Event:connect(function()
  349. game:GetService("StarterGui"):SetCore("ResetButtonCallback", true)
  350. resetBindable:Destroy()
  351. pcall(function()
  352. CloneChar.Humanoid.Health = 0
  353. DeadChar.Humanoid.Health = 0
  354. end)
  355. end)
  356. game:GetService("StarterGui"):SetCore("ResetButtonCallback", resetBindable)
  357.  
  358. coroutine.wrap(function()
  359. while true do
  360. game:GetService("RunService").RenderStepped:wait()
  361. if not CloneChar or not CloneChar:FindFirstChild("Head") or not CloneChar:FindFirstChild("Humanoid") or CloneChar:FindFirstChild("Humanoid").Health <= 0 or not DeadChar or not DeadChar:FindFirstChild("Head") or not DeadChar:FindFirstChild("Humanoid") or DeadChar:FindFirstChild("Humanoid").Health <= 0 then
  362. HumanDied = true
  363. FakeCharacter:Destroy()
  364. script:Destroy()
  365. pcall(function()
  366. game.Players.LocalPlayer.Character = CloneChar
  367. CloneChar:Destroy()
  368. game.Players.LocalPlayer.Character = DeadChar
  369. if resetBindable then
  370. game:GetService("StarterGui"):SetCore("ResetButtonCallback", true)
  371. resetBindable:Destroy()
  372. end
  373. DeadChar.Humanoid.Health = 0
  374. end)
  375. break
  376. end
  377. end
  378. end)()
  379.  
  380. SCIFIMOVIELOL(DeadChar["Head"],CloneChar["Head"],Vector3.new(0,0,0),Vector3.new(0,0,0))
  381. SCIFIMOVIELOL(DeadChar["Torso"],CloneChar["Torso"],Vector3.new(0,0,0),Vector3.new(0,0,0))
  382. SCIFIMOVIELOL(DeadChar["Left Arm"],CloneChar["Left Arm"],Vector3.new(0,0,0),Vector3.new(0,0,0))
  383. SCIFIMOVIELOL(DeadChar["Right Arm"],CloneChar["Right Arm"],Vector3.new(0,0,0),Vector3.new(0,0,0))
  384. SCIFIMOVIELOL(DeadChar["Left Leg"],CloneChar["Left Leg"],Vector3.new(0,0,0),Vector3.new(0,0,0))
  385. SCIFIMOVIELOL(DeadChar["Right Leg"],CloneChar["Right Leg"],Vector3.new(0,0,0),Vector3.new(0,0,0))
  386.  
  387. coroutine.wrap(function()
  388. while true do
  389. game:GetService("RunService").RenderStepped:wait()
  390. if HumanDied then break end
  391. DeadChar["Torso"].CFrame = CloneChar["Torso"].CFrame
  392. end
  393. end)()
  394.  
  395.  
  396.  
  397. for _,BodyParts in next, CloneChar:GetDescendants() do
  398. if BodyParts:IsA("BasePart") or BodyParts:IsA("Part") then
  399. BodyParts.Transparency = 1 end end
  400.  
  401. DeadChar.Torso["Left Shoulder"]:Destroy()
  402. DeadChar.Torso["Right Shoulder"]:Destroy()
  403. DeadChar.Torso["Left Hip"]:Destroy()
  404. DeadChar.Torso["Right Hip"]:Destroy()
  405.  
  406. elseif Bypass == "death" then --------------------------------------------------------------------------------------------------------------------
  407. game:GetService("Players").LocalPlayer["Character"].Archivable = true
  408. local CloneChar = game:GetService("Players").LocalPlayer["Character"]:Clone()
  409. game:GetService("Players").LocalPlayer["Character"].Humanoid.WalkSpeed = 0
  410. game:GetService("Players").LocalPlayer["Character"].Humanoid.JumpPower = 0
  411. game:GetService("Players").LocalPlayer["Character"].Humanoid.AutoRotate = false
  412. local FalseChar = Instance.new("Model", workspace); FalseChar.Name = ""
  413. Instance.new("Part",FalseChar).Name = "Head"
  414. Instance.new("Part",FalseChar).Name = "Torso"
  415. Instance.new("Humanoid",FalseChar).Name = "Humanoid"
  416. game:GetService("Players").LocalPlayer["Character"] = FalseChar
  417. game:GetService("Players").LocalPlayer["Character"].Humanoid.Name = "FalseHumanoid"
  418. local Clone = game:GetService("Players").LocalPlayer["Character"]:FindFirstChild("FalseHumanoid"):Clone()
  419. Clone.Parent = game:GetService("Players").LocalPlayer["Character"]
  420. Clone.Name = "Humanoid"
  421. game:GetService("Players").LocalPlayer["Character"]:FindFirstChild("FalseHumanoid"):Destroy()
  422. game:GetService("Players").LocalPlayer["Character"].Humanoid.Health = 0
  423. game:GetService("Players").LocalPlayer["Character"] = workspace[game:GetService("Players").LocalPlayer.Name]
  424.  
  425.  
  426. StickParts(FakeLimbs["Head"],FakeCharacter.Head,Vector3.new(0,0,0))
  427. StickParts(FakeLimbs["Right Arm"],FakeCharacter["Right Arm"],Vector3.new(90,0,0))
  428. StickParts(FakeLimbs["Left Arm"],FakeCharacter["Left Arm"],Vector3.new(90,0,0))
  429. StickParts(FakeLimbs["Right Leg"],FakeCharacter["Right Leg"],Vector3.new(90,0,0))
  430. StickParts(FakeLimbs["Left Leg"],FakeCharacter["Left Leg"],Vector3.new(90,0,0))
  431. StickParts(FakeLimbs["Torso1"],FakeCharacter.Torso,Vector3.new(90,0,0),Vector3.new(0.5,0,0))
  432. StickParts(FakeLimbs["Torso2"],FakeCharacter.Torso,Vector3.new(90,0,0),Vector3.new(-0.5,0,0))
  433. FakeCharacter.HumanoidRootPart.CFrame = game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame
  434.  
  435. wait(5.65)
  436. game:GetService("Players").LocalPlayer["Character"].Humanoid.Health = 0
  437. CloneChar.Parent = workspace
  438. CloneChar.HumanoidRootPart.CFrame = game:GetService("Players").LocalPlayer["Character"].HumanoidRootPart.CFrame * CFrame.new(0,2,0)
  439. wait()
  440. CloneChar.Humanoid.BreakJointsOnDeath = false
  441. workspace.Camera.CameraSubject = CloneChar.Humanoid
  442. CloneChar.Name = "non"
  443. CloneChar.Humanoid.DisplayDistanceType = "None"
  444. if CloneChar.Head:FindFirstChild("face") then CloneChar.Head:FindFirstChild("face"):Destroy() end
  445. if workspace[game:GetService("Players").LocalPlayer.Name].Head:FindFirstChild("face") then workspace[game:GetService("Players").LocalPlayer.Name].Head:FindFirstChild("face").Parent = CloneChar.Head end
  446.  
  447. FalseChar:Destroy()
  448.  
  449. local DeadChar = workspace[game:GetService("Players").LocalPlayer.Name]
  450.  
  451. local LVecPart = Instance.new("Part", workspace) LVecPart.CanCollide = false LVecPart.Transparency = 1
  452. local CONVEC
  453. local function VECTORUNIT()
  454. if HumanDied then CONVEC:Disconnect(); return end
  455. local lookVec = workspace.Camera.CFrame.lookVector
  456. local Root = CloneChar["HumanoidRootPart"]
  457. LVecPart.Position = Root.Position
  458. LVecPart.CFrame = CFrame.new(LVecPart.Position, Vector3.new(lookVec.X * 9999, lookVec.Y, lookVec.Z * 9999))
  459. end
  460. CONVEC = game:GetService("RunService").Heartbeat:Connect(VECTORUNIT)
  461.  
  462. local CONDOWN
  463. local WDown, ADown, SDown, DDown, SpaceDown = false, false, false, false, false
  464. local function KEYDOWN(_,Processed)
  465. if HumanDied then CONDOWN:Disconnect(); return end
  466. if Processed ~= true then
  467. local Key = _.KeyCode
  468. if Key == Enum.KeyCode.W then
  469. WDown = true end
  470. if Key == Enum.KeyCode.A then
  471. ADown = true end
  472. if Key == Enum.KeyCode.S then
  473. SDown = true end
  474. if Key == Enum.KeyCode.D then
  475. DDown = true end
  476. if Key == Enum.KeyCode.Space then
  477. SpaceDown = true end end end
  478. CONDOWN = game:GetService("UserInputService").InputBegan:Connect(KEYDOWN)
  479.  
  480. local CONUP
  481. local function KEYUP(_)
  482. if HumanDied then CONUP:Disconnect(); return end
  483. local Key = _.KeyCode
  484. if Key == Enum.KeyCode.W then
  485. WDown = false end
  486. if Key == Enum.KeyCode.A then
  487. ADown = false end
  488. if Key == Enum.KeyCode.S then
  489. SDown = false end
  490. if Key == Enum.KeyCode.D then
  491. DDown = false end
  492. if Key == Enum.KeyCode.Space then
  493. SpaceDown = false end end
  494. CONUP = game:GetService("UserInputService").InputEnded:Connect(KEYUP)
  495.  
  496. local function MoveClone(X,Y,Z)
  497. LVecPart.CFrame = LVecPart.CFrame * CFrame.new(-X,Y,-Z)
  498. workspace["non"].Humanoid.WalkToPoint = LVecPart.Position
  499. end
  500.  
  501. coroutine.wrap(function()
  502. while true do game:GetService("RunService").RenderStepped:Wait()
  503. if HumanDied then break end
  504. if WDown then MoveClone(0,0,1e4) end
  505. if ADown then MoveClone(1e4,0,0) end
  506. if SDown then MoveClone(0,0,-1e4) end
  507. if DDown then MoveClone(-1e4,0,0) end
  508. if SpaceDown then CloneChar["Humanoid"].Jump = true end
  509. if WDown ~= true and ADown ~= true and SDown ~= true and DDown ~= true then
  510. CloneChar.Humanoid.WalkToPoint = CloneChar.HumanoidRootPart.Position end
  511. end
  512. end)()
  513.  
  514. local con
  515. function UnCollide()
  516. if HumanDied then con:Disconnect(); return end
  517. for _,Parts in next, CloneChar:GetDescendants() do
  518. if Parts:IsA("BasePart") then
  519. HumanRoot.CanCollide = false
  520. Parts.CanCollide = false
  521. end
  522. end
  523. for _,Parts in next, DeadChar:GetDescendants() do
  524. if Parts:IsA("BasePart") then
  525. Parts.CanCollide = false
  526. HumanRoot.CanCollide = false
  527. end
  528. end
  529. end
  530. con = game:GetService("RunService").Stepped:Connect(UnCollide)
  531.  
  532. local resetBindable = Instance.new("BindableEvent")
  533. resetBindable.Event:connect(function()
  534. game:GetService("StarterGui"):SetCore("ResetButtonCallback", true)
  535. resetBindable:Destroy()
  536. CloneChar.Humanoid.Health = 0
  537. end)
  538. game:GetService("StarterGui"):SetCore("ResetButtonCallback", resetBindable)
  539.  
  540. coroutine.wrap(function()
  541. while true do
  542. game:GetService("RunService").RenderStepped:wait()
  543. if not CloneChar or not CloneChar:FindFirstChild("Head") or not CloneChar:FindFirstChild("Humanoid") or CloneChar:FindFirstChild("Humanoid").Health <= 0 then
  544. HumanDied = true
  545. pcall(function()
  546. game.Players.LocalPlayer.Character = CloneChar
  547. CloneChar:Destroy()
  548. game.Players.LocalPlayer.Character = DeadChar
  549. if resetBindable then
  550. game:GetService("StarterGui"):SetCore("ResetButtonCallback", true)
  551. resetBindable:Destroy()
  552. end
  553. DeadChar.Humanoid.Health = 0
  554. end)
  555. break
  556. end
  557. end
  558. end)()
  559.  
  560. SCIFIMOVIELOL(DeadChar["Head"],CloneChar["Head"],Vector3.new(0,0,0),Vector3.new(0,0,0))
  561. SCIFIMOVIELOL(DeadChar["Torso"],CloneChar["Torso"],Vector3.new(0,0,0),Vector3.new(0,0,0))
  562. SCIFIMOVIELOL(DeadChar["Left Arm"],CloneChar["Left Arm"],Vector3.new(0,0,0),Vector3.new(0,0,0))
  563. SCIFIMOVIELOL(DeadChar["Right Arm"],CloneChar["Right Arm"],Vector3.new(0,0,0),Vector3.new(0,0,0))
  564. SCIFIMOVIELOL(DeadChar["Left Leg"],CloneChar["Left Leg"],Vector3.new(0,0,0),Vector3.new(0,0,0))
  565. SCIFIMOVIELOL(DeadChar["Right Leg"],CloneChar["Right Leg"],Vector3.new(0,0,0),Vector3.new(0,0,0))
  566.  
  567.  
  568. for _,v in next, DeadChar:GetChildren() do
  569. if v:IsA("Accessory") then
  570. if v.Name == "WDW_FoamFinger" then
  571. GunHat = v.Handle
  572. SCIFIMOVIELOL(GunHat,m4,Vector3.new(0,0,0),Vector3.new(0,-90,-90))
  573.  
  574. elseif v.Name == "MediHood" then
  575. SoldierHelm = v.Handle
  576. SCIFIMOVIELOL(SoldierHelm,FakeCharacter.Head,Vector3.new(0, 0.44308090209961, -0.0026588439941406),Vector3.new(0,0,0))
  577. print("lol")
  578. end
  579. end
  580. end
  581.  
  582.  
  583.  
  584. for _,BodyParts in next, CloneChar:GetDescendants() do
  585. if BodyParts:IsA("BasePart") or BodyParts:IsA("Part") then
  586. BodyParts.Transparency = 1 end end
  587. elseif Bypass == "hats" then
  588. game:GetService("Players").LocalPlayer["Character"].Archivable = true
  589. local DeadChar = game.Players.LocalPlayer.Character
  590. DeadChar.Name = "non"
  591. local HatPosition = Vector3.new(0,0,0)
  592. local HatName = "MediHood"
  593. local HatsLimb = {
  594. Rarm = DeadChar:FindFirstChild("Hat1"),
  595. Larm = DeadChar:FindFirstChild("Pink Hair"),
  596. Rleg = DeadChar:FindFirstChild("Robloxclassicred"),
  597. Lleg = DeadChar:FindFirstChild("Kate Hair"),
  598. Torso1 = DeadChar:FindFirstChild("Pal Hair"),
  599. Torso2 = DeadChar:FindFirstChild("LavanderHair")
  600. }
  601. HatName = DeadChar:FindFirstChild(HatName)
  602.  
  603. coroutine.wrap(function()
  604. while true do
  605. game:GetService("RunService").RenderStepped:wait()
  606. if not DeadChar or not DeadChar:FindFirstChild("Head") or not DeadChar:FindFirstChild("Humanoid") or DeadChar:FindFirstChild("Humanoid").Health <= 0 then
  607. HumanDied = true
  608. pcall(function()
  609. if resetBindable then
  610. game:GetService("StarterGui"):SetCore("ResetButtonCallback", true)
  611. resetBindable:Destroy()
  612. end
  613. DeadChar.Humanoid.Health = 0
  614. end)
  615. break
  616. end
  617. end
  618. end)()
  619.  
  620. local con
  621. function UnCollide()
  622. if HumanDied then con:Disconnect(); return end
  623. for _,Parts in next, DeadChar:GetDescendants() do
  624. if Parts:IsA("BasePart") then
  625. Parts.CanCollide = false
  626. end
  627. end
  628. end
  629. local con2
  630. function UnCollide2()
  631. if HumanDied then con:Disconnect(); return end
  632. for _,Parts in next, FakeCharacter:GetDescendants() do
  633. if Parts:IsA("BasePart") then
  634. Parts.CanCollide = false
  635. end
  636. end
  637. end
  638. con = game:GetService("RunService").Stepped:Connect(UnCollide)
  639. con2 = game:GetService("RunService").Stepped:Connect(UnCollide2)
  640.  
  641. SCIFIMOVIELOL(HatName.Handle,DeadChar["Head"],Vector3.new(0,0,0),Vector3.new(0,0,0))
  642. SCIFIMOVIELOL(HatsLimb.Torso1.Handle,DeadChar["Torso"],Vector3.new(0.5,0,0),Vector3.new(90,0,0))
  643. SCIFIMOVIELOL(HatsLimb.Torso2.Handle,DeadChar["Torso"],Vector3.new(-0.5,0,0),Vector3.new(90,0,0))
  644. SCIFIMOVIELOL(HatsLimb.Larm.Handle,DeadChar["Left Arm"],Vector3.new(0,0,0),Vector3.new(90,0,0))
  645. SCIFIMOVIELOL(HatsLimb.Rarm.Handle,DeadChar["Right Arm"],Vector3.new(0,0,0),Vector3.new(90,0,0))
  646. SCIFIMOVIELOL(HatsLimb.Lleg.Handle,DeadChar["Left Leg"],Vector3.new(0,0,0),Vector3.new(90,0,0))
  647. SCIFIMOVIELOL(HatsLimb.Rleg.Handle,DeadChar["Right Leg"],Vector3.new(0,0,0),Vector3.new(90,0,0))
  648.  
  649. for i,v in pairs(HatsLimb) do
  650. v.Handle:FindFirstChild("AccessoryWeld"):Destroy()
  651. if v.Handle:FindFirstChild("Mesh") then v.Handle:FindFirstChild("Mesh"):Destroy() end
  652. if v.Handle:FindFirstChild("SpecialMesh") then v.Handle:FindFirstChild("SpecialMesh"):Destroy() end
  653. end
  654. HatName.Handle:FindFirstChild("AccessoryWeld"):Destroy()
  655. end
  656. else
  657. if Bypass == "limbs" then --------------------------------------------------------------------------------------------------------------------
  658. game:GetService("Players").LocalPlayer["Character"].Archivable = true
  659. local CloneChar = game:GetObjects("rbxassetid://5227463276")[1]
  660. CloneChar.Parent = workspace
  661. CloneChar.HumanoidRootPart.CFrame = game:GetService("Players").LocalPlayer["Character"].HumanoidRootPart.CFrame * CFrame.new(0,0.5,0.1)
  662. CloneChar.Humanoid.BreakJointsOnDeath = false
  663. workspace.Camera.CameraSubject = CloneChar.Humanoid
  664. CloneChar.Name = "non"
  665. CloneChar.Humanoid.DisplayDistanceType = "None"
  666. if CloneChar.Head:FindFirstChild("face") then CloneChar.Head:FindFirstChild("face"):Destroy() end
  667. if workspace[game:GetService("Players").LocalPlayer.Name].Head:FindFirstChild("face") then workspace[game:GetService("Players").LocalPlayer.Name].Head:FindFirstChild("face").Parent = CloneChar.Head end
  668.  
  669. local DeadChar = workspace[game:GetService("Players").LocalPlayer.Name]
  670. DeadChar.HumanoidRootPart:Destroy()
  671.  
  672. local LVecPart = Instance.new("Part", workspace) LVecPart.CanCollide = false LVecPart.Transparency = 1
  673. local CONVEC
  674. local function VECTORUNIT()
  675. if HumanDied then CONVEC:Disconnect(); return end
  676. local lookVec = workspace.Camera.CFrame.lookVector
  677. local Root = CloneChar["HumanoidRootPart"]
  678. LVecPart.Position = Root.Position
  679. LVecPart.CFrame = CFrame.new(LVecPart.Position, Vector3.new(lookVec.X * 9999, lookVec.Y, lookVec.Z * 9999))
  680. end
  681. CONVEC = game:GetService("RunService").Heartbeat:Connect(VECTORUNIT)
  682.  
  683. local CONDOWN
  684. local WDown, ADown, SDown, DDown, SpaceDown = false, false, false, false, false
  685. local function KEYDOWN(_,Processed)
  686. if HumanDied then CONDOWN:Disconnect(); return end
  687. if Processed ~= true then
  688. local Key = _.KeyCode
  689. if Key == Enum.KeyCode.W then
  690. WDown = true end
  691. if Key == Enum.KeyCode.A then
  692. ADown = true end
  693. if Key == Enum.KeyCode.S then
  694. SDown = true end
  695. if Key == Enum.KeyCode.D then
  696. DDown = true end
  697. if Key == Enum.KeyCode.Space then
  698. SpaceDown = true end end end
  699. CONDOWN = game:GetService("UserInputService").InputBegan:Connect(KEYDOWN)
  700.  
  701. local CONUP
  702. local function KEYUP(_)
  703. if HumanDied then CONUP:Disconnect(); return end
  704. local Key = _.KeyCode
  705. if Key == Enum.KeyCode.W then
  706. WDown = false end
  707. if Key == Enum.KeyCode.A then
  708. ADown = false end
  709. if Key == Enum.KeyCode.S then
  710. SDown = false end
  711. if Key == Enum.KeyCode.D then
  712. DDown = false end
  713. if Key == Enum.KeyCode.Space then
  714. SpaceDown = false end end
  715. CONUP = game:GetService("UserInputService").InputEnded:Connect(KEYUP)
  716.  
  717. local function MoveClone(X,Y,Z)
  718. LVecPart.CFrame = LVecPart.CFrame * CFrame.new(-X,Y,-Z)
  719. workspace["non"].Humanoid.WalkToPoint = LVecPart.Position
  720. end
  721.  
  722. coroutine.wrap(function()
  723. while true do game:GetService("RunService").RenderStepped:Wait()
  724. if HumanDied then break end
  725. if WDown then MoveClone(0,0,1e4) end
  726. if ADown then MoveClone(1e4,0,0) end
  727. if SDown then MoveClone(0,0,-1e4) end
  728. if DDown then MoveClone(-1e4,0,0) end
  729. if SpaceDown then CloneChar["Humanoid"].Jump = true end
  730. if WDown ~= true and ADown ~= true and SDown ~= true and DDown ~= true then
  731. workspace["non"].Humanoid.WalkToPoint = workspace["non"].HumanoidRootPart.Position end
  732. end
  733. end)()
  734.  
  735. local con
  736. function UnCollide()
  737. if HumanDied then con:Disconnect(); return end
  738. for _,Parts in next, CloneChar:GetDescendants() do
  739. if Parts:IsA("BasePart") then
  740. Parts.CanCollide = false
  741. end
  742. end
  743. for _,Parts in next, DeadChar:GetDescendants() do
  744. if Parts:IsA("BasePart") then
  745. Parts.CanCollide = false
  746. end
  747. end
  748. end
  749. con = game:GetService("RunService").Stepped:Connect(UnCollide)
  750.  
  751. local resetBindable = Instance.new("BindableEvent")
  752. resetBindable.Event:connect(function()
  753. game:GetService("StarterGui"):SetCore("ResetButtonCallback", true)
  754. resetBindable:Destroy()
  755. CloneChar.Humanoid.Health = 0
  756. end)
  757. game:GetService("StarterGui"):SetCore("ResetButtonCallback", resetBindable)
  758.  
  759. coroutine.wrap(function()
  760. while true do
  761. game:GetService("RunService").RenderStepped:wait()
  762. if not CloneChar or not CloneChar:FindFirstChild("Head") or not CloneChar:FindFirstChild("Humanoid") or CloneChar:FindFirstChild("Humanoid").Health <= 0 or not DeadChar or not DeadChar:FindFirstChild("Head") or not DeadChar:FindFirstChild("Humanoid") or DeadChar:FindFirstChild("Humanoid").Health <= 0 then
  763. HumanDied = true
  764. pcall(function()
  765. game.Players.LocalPlayer.Character = CloneChar
  766. CloneChar:Destroy()
  767. game.Players.LocalPlayer.Character = DeadChar
  768. if resetBindable then
  769. game:GetService("StarterGui"):SetCore("ResetButtonCallback", true)
  770. resetBindable:Destroy()
  771. end
  772. DeadChar.Humanoid.Health = 0
  773. end)
  774. break
  775. end
  776. end
  777. end)()
  778.  
  779. for _,v in next, DeadChar:GetChildren() do
  780. if v:IsA("Accessory") then
  781. v:Clone().Parent = CloneChar
  782. end
  783. end
  784.  
  785. for _,v in next, DeadChar:GetDescendants() do
  786. if v:IsA("Motor6D") and v.Name ~= "Neck" then
  787. v:Destroy()
  788. end
  789. end
  790.  
  791. SCIFIMOVIELOL(DeadChar["Head"],CloneChar["Head"],Vector3.new(0,0,0),Vector3.new(0,0,0))
  792. SCIFIMOVIELOL(DeadChar["UpperTorso"],CloneChar["Torso"],Vector3.new(0,0.2,0),Vector3.new(0,0,0))
  793. SCIFIMOVIELOL(DeadChar["LowerTorso"],CloneChar["Torso"],Vector3.new(0,-0.78,0),Vector3.new(0,0,0))
  794. SCIFIMOVIELOL(DeadChar["LeftUpperArm"],CloneChar["Left Arm"],Vector3.new(0,0.375,0),Vector3.new(0,0,0))
  795. SCIFIMOVIELOL(DeadChar["LeftLowerArm"],CloneChar["Left Arm"],Vector3.new(0,-0.215,0),Vector3.new(0,0,0))
  796. SCIFIMOVIELOL(DeadChar["LeftHand"],CloneChar["Left Arm"],Vector3.new(0,-0.825,0),Vector3.new(0,0,0))
  797. SCIFIMOVIELOL(DeadChar["RightUpperArm"],CloneChar["Right Arm"],Vector3.new(0,0.375,0),Vector3.new(0,0,0))
  798. SCIFIMOVIELOL(DeadChar["RightLowerArm"],CloneChar["Right Arm"],Vector3.new(0,-0.215,0),Vector3.new(0,0,0))
  799. SCIFIMOVIELOL(DeadChar["RightHand"],CloneChar["Right Arm"],Vector3.new(0,-0.825,0),Vector3.new(0,0,0))
  800.  
  801. SCIFIMOVIELOL(DeadChar["LeftUpperLeg"],CloneChar["Left Leg"],Vector3.new(0,0.575,0),Vector3.new(0,0,0))
  802. SCIFIMOVIELOL(DeadChar["LeftLowerLeg"],CloneChar["Left Leg"],Vector3.new(0,-0.137,0),Vector3.new(0,0,0))
  803. SCIFIMOVIELOL(DeadChar["LeftFoot"],CloneChar["Left Leg"],Vector3.new(0,-0.787,0),Vector3.new(0,0,0))
  804. SCIFIMOVIELOL(DeadChar["RightUpperLeg"],CloneChar["Right Leg"],Vector3.new(0,0.575,0),Vector3.new(0,0,0))
  805. SCIFIMOVIELOL(DeadChar["RightLowerLeg"],CloneChar["Right Leg"],Vector3.new(0,-0.137,0),Vector3.new(0,0,0))
  806. SCIFIMOVIELOL(DeadChar["RightFoot"],CloneChar["Right Leg"],Vector3.new(0,-0.787,0),Vector3.new(0,0,0))
  807.  
  808. coroutine.wrap(function()
  809. while true do
  810. game:GetService("RunService").RenderStepped:wait()
  811. if HumanDied then break end
  812. DeadChar["UpperTorso"].CFrame = CloneChar["Torso"].CFrame * CFrame.new(0,0.2,0)
  813. end
  814. end)()
  815.  
  816. for _,v in next, DeadChar:GetChildren() do
  817. if v:IsA("Accessory") then
  818. SCIFIMOVIELOL(v.Handle,CloneChar[v.Name].Handle,Vector3.new(0,0,0),Vector3.new(0,0,0))
  819. end
  820. end
  821.  
  822. for _,BodyParts in next, CloneChar:GetDescendants() do
  823. if BodyParts:IsA("BasePart") or BodyParts:IsA("Part") then
  824. BodyParts.Transparency = 1 end end
  825.  
  826. elseif Bypass == "death" then --------------------------------------------------------------------------------------------------------------------
  827. game:GetService("Players").LocalPlayer["Character"].Archivable = true
  828. local CloneChar = game:GetObjects("rbxassetid://5227463276")[1]
  829. game:GetService("Players").LocalPlayer["Character"].Humanoid.WalkSpeed = 0
  830. game:GetService("Players").LocalPlayer["Character"].Humanoid.JumpPower = 0
  831. game:GetService("Players").LocalPlayer["Character"].Humanoid.AutoRotate = false
  832. local FalseChar = Instance.new("Model", workspace); FalseChar.Name = ""
  833. Instance.new("Part",FalseChar).Name = "Head"
  834. Instance.new("Part",FalseChar).Name = "UpperTorso"
  835. Instance.new("Humanoid",FalseChar).Name = "Humanoid"
  836. game:GetService("Players").LocalPlayer["Character"] = FalseChar
  837. game:GetService("Players").LocalPlayer["Character"].Humanoid.Name = "FalseHumanoid"
  838. local Clone = game:GetService("Players").LocalPlayer["Character"]:FindFirstChild("FalseHumanoid"):Clone()
  839. Clone.Parent = game:GetService("Players").LocalPlayer["Character"]
  840. Clone.Name = "Humanoid"
  841. game:GetService("Players").LocalPlayer["Character"]:FindFirstChild("FalseHumanoid"):Destroy()
  842. game:GetService("Players").LocalPlayer["Character"].Humanoid.Health = 0
  843. game:GetService("Players").LocalPlayer["Character"] = workspace[game:GetService("Players").LocalPlayer.Name]
  844. wait(5.65)
  845. game:GetService("Players").LocalPlayer["Character"].Humanoid.Health = 0
  846. CloneChar.Parent = workspace
  847. CloneChar.HumanoidRootPart.CFrame = game:GetService("Players").LocalPlayer["Character"].HumanoidRootPart.CFrame * CFrame.new(0,0.5,0.1)
  848. wait()
  849. CloneChar.Humanoid.BreakJointsOnDeath = false
  850. workspace.Camera.CameraSubject = CloneChar.Humanoid
  851. CloneChar.Name = "non"
  852. CloneChar.Humanoid.DisplayDistanceType = "None"
  853. if CloneChar.Head:FindFirstChild("face") then CloneChar.Head:FindFirstChild("face"):Destroy() end
  854. if workspace[game:GetService("Players").LocalPlayer.Name].Head:FindFirstChild("face") then workspace[game:GetService("Players").LocalPlayer.Name].Head:FindFirstChild("face").Parent = CloneChar.Head end
  855.  
  856. FalseChar:Destroy()
  857.  
  858. local DeadChar = workspace[game:GetService("Players").LocalPlayer.Name]
  859.  
  860. local LVecPart = Instance.new("Part", workspace) LVecPart.CanCollide = false LVecPart.Transparency = 1
  861. local CONVEC
  862. local function VECTORUNIT()
  863. if HumanDied then CONVEC:Disconnect(); return end
  864. local lookVec = workspace.Camera.CFrame.lookVector
  865. local Root = CloneChar["HumanoidRootPart"]
  866. LVecPart.Position = Root.Position
  867. LVecPart.CFrame = CFrame.new(LVecPart.Position, Vector3.new(lookVec.X * 9999, lookVec.Y, lookVec.Z * 9999))
  868. end
  869. CONVEC = game:GetService("RunService").Heartbeat:Connect(VECTORUNIT)
  870.  
  871. local CONDOWN
  872. local WDown, ADown, SDown, DDown, SpaceDown = false, false, false, false, false
  873. local function KEYDOWN(_,Processed)
  874. if HumanDied then CONDOWN:Disconnect(); return end
  875. if Processed ~= true then
  876. local Key = _.KeyCode
  877. if Key == Enum.KeyCode.W then
  878. WDown = true end
  879. if Key == Enum.KeyCode.A then
  880. ADown = true end
  881. if Key == Enum.KeyCode.S then
  882. SDown = true end
  883. if Key == Enum.KeyCode.D then
  884. DDown = true end
  885. if Key == Enum.KeyCode.Space then
  886. SpaceDown = true end end end
  887. CONDOWN = game:GetService("UserInputService").InputBegan:Connect(KEYDOWN)
  888.  
  889. local CONUP
  890. local function KEYUP(_)
  891. if HumanDied then CONUP:Disconnect(); return end
  892. local Key = _.KeyCode
  893. if Key == Enum.KeyCode.W then
  894. WDown = false end
  895. if Key == Enum.KeyCode.A then
  896. ADown = false end
  897. if Key == Enum.KeyCode.S then
  898. SDown = false end
  899. if Key == Enum.KeyCode.D then
  900. DDown = false end
  901. if Key == Enum.KeyCode.Space then
  902. SpaceDown = false end end
  903. CONUP = game:GetService("UserInputService").InputEnded:Connect(KEYUP)
  904.  
  905. local function MoveClone(X,Y,Z)
  906. LVecPart.CFrame = LVecPart.CFrame * CFrame.new(-X,Y,-Z)
  907. workspace["non"].Humanoid.WalkToPoint = LVecPart.Position
  908. end
  909.  
  910. coroutine.wrap(function()
  911. while true do game:GetService("RunService").RenderStepped:Wait()
  912. if HumanDied then break end
  913. if WDown then MoveClone(0,0,1e4) end
  914. if ADown then MoveClone(1e4,0,0) end
  915. if SDown then MoveClone(0,0,-1e4) end
  916. if DDown then MoveClone(-1e4,0,0) end
  917. if SpaceDown then CloneChar["Humanoid"].Jump = true end
  918. if WDown ~= true and ADown ~= true and SDown ~= true and DDown ~= true then
  919. workspace["non"].Humanoid.WalkToPoint = workspace["non"].HumanoidRootPart.Position end
  920. end
  921. end)()
  922.  
  923. local con
  924. function UnCollide()
  925. if HumanDied then con:Disconnect(); return end
  926. for _,Parts in next, CloneChar:GetDescendants() do
  927. if Parts:IsA("BasePart") then
  928. Parts.CanCollide = false
  929. end
  930. end
  931. for _,Parts in next, DeadChar:GetDescendants() do
  932. if Parts:IsA("BasePart") then
  933. Parts.CanCollide = false
  934. end
  935. end
  936. end
  937. con = game:GetService("RunService").Stepped:Connect(UnCollide)
  938.  
  939. local resetBindable = Instance.new("BindableEvent")
  940. resetBindable.Event:connect(function()
  941. game:GetService("StarterGui"):SetCore("ResetButtonCallback", true)
  942. resetBindable:Destroy()
  943. CloneChar.Humanoid.Health = 0
  944. end)
  945. game:GetService("StarterGui"):SetCore("ResetButtonCallback", resetBindable)
  946.  
  947. coroutine.wrap(function()
  948. while true do
  949. game:GetService("RunService").RenderStepped:wait()
  950. if not CloneChar or not CloneChar:FindFirstChild("Head") or not CloneChar:FindFirstChild("Humanoid") or CloneChar:FindFirstChild("Humanoid").Health <= 0 then
  951. HumanDied = true
  952. pcall(function()
  953. game.Players.LocalPlayer.Character = CloneChar
  954. CloneChar:Destroy()
  955. game.Players.LocalPlayer.Character = DeadChar
  956. if resetBindable then
  957. game:GetService("StarterGui"):SetCore("ResetButtonCallback", true)
  958. resetBindable:Destroy()
  959. end
  960. DeadChar.Humanoid.Health = 0
  961. end)
  962. break
  963. end
  964. end
  965. end)()
  966.  
  967. for _,v in next, DeadChar:GetChildren() do
  968. if v:IsA("Accessory") then
  969. v:Clone().Parent = CloneChar
  970. end
  971. end
  972.  
  973. SCIFIMOVIELOL(DeadChar["Head"],CloneChar["Head"],Vector3.new(0,0,0),Vector3.new(0,0,0))
  974. SCIFIMOVIELOL(DeadChar["UpperTorso"],CloneChar["Torso"],Vector3.new(0,0.2,0),Vector3.new(0,0,0))
  975. SCIFIMOVIELOL(DeadChar["LowerTorso"],CloneChar["Torso"],Vector3.new(0,-0.78,0),Vector3.new(0,0,0))
  976. SCIFIMOVIELOL(DeadChar["LeftUpperArm"],CloneChar["Left Arm"],Vector3.new(0,0.375,0),Vector3.new(0,0,0))
  977. SCIFIMOVIELOL(DeadChar["LeftLowerArm"],CloneChar["Left Arm"],Vector3.new(0,-0.215,0),Vector3.new(0,0,0))
  978. SCIFIMOVIELOL(DeadChar["LeftHand"],CloneChar["Left Arm"],Vector3.new(0,-0.825,0),Vector3.new(0,0,0))
  979. SCIFIMOVIELOL(DeadChar["RightUpperArm"],CloneChar["Right Arm"],Vector3.new(0,0.375,0),Vector3.new(0,0,0))
  980. SCIFIMOVIELOL(DeadChar["RightLowerArm"],CloneChar["Right Arm"],Vector3.new(0,-0.215,0),Vector3.new(0,0,0))
  981. SCIFIMOVIELOL(DeadChar["RightHand"],CloneChar["Right Arm"],Vector3.new(0,-0.825,0),Vector3.new(0,0,0))
  982.  
  983. SCIFIMOVIELOL(DeadChar["LeftUpperLeg"],CloneChar["Left Leg"],Vector3.new(0,0.575,0),Vector3.new(0,0,0))
  984. SCIFIMOVIELOL(DeadChar["LeftLowerLeg"],CloneChar["Left Leg"],Vector3.new(0,-0.137,0),Vector3.new(0,0,0))
  985. SCIFIMOVIELOL(DeadChar["LeftFoot"],CloneChar["Left Leg"],Vector3.new(0,-0.787,0),Vector3.new(0,0,0))
  986. SCIFIMOVIELOL(DeadChar["RightUpperLeg"],CloneChar["Right Leg"],Vector3.new(0,0.575,0),Vector3.new(0,0,0))
  987. SCIFIMOVIELOL(DeadChar["RightLowerLeg"],CloneChar["Right Leg"],Vector3.new(0,-0.137,0),Vector3.new(0,0,0))
  988. SCIFIMOVIELOL(DeadChar["RightFoot"],CloneChar["Right Leg"],Vector3.new(0,-0.787,0),Vector3.new(0,0,0))
  989.  
  990. SCIFIMOVIELOL(DeadChar["HumanoidRootPart"],CloneChar["HumanoidRootPart"],Vector3.new(0,0,0),Vector3.new(0,0,0))
  991.  
  992. for _,v in next, DeadChar:GetChildren() do
  993. if v:IsA("Accessory") then
  994. SCIFIMOVIELOL(v.Handle,CloneChar[v.Name].Handle,Vector3.new(0,0,0),Vector3.new(0,0,0))
  995. end
  996. end
  997.  
  998. for _,BodyParts in next, CloneChar:GetDescendants() do
  999. if BodyParts:IsA("BasePart") or BodyParts:IsA("Part") then
  1000. BodyParts.Transparency = 1 end end
  1001. if DeadChar.Head:FindFirstChild("Neck") then
  1002. game.Players.LocalPlayer.Character:BreakJoints()
  1003. end
  1004. end
  1005. end
  1006.  
  1007.  
  1008. end
  1009.  
  1010.  
  1011.  
  1012. local CloneChar = workspace.non
  1013. game.Players.LocalPlayer.Character.Parent = CloneChar
  1014.  
  1015. local MakeNewAnim = function(id)
  1016. local NewAnim = Instance.new("Animation")
  1017. NewAnim.AnimationId = id
  1018. return {NewAnim,id}
  1019. end
  1020.  
  1021. function CreoFEFakeAnimations(Character)
  1022. spawn(function()
  1023. local Humanoid = Character:FindFirstChildWhichIsA("Humanoid")
  1024. local HRP = Character:WaitForChild("HumanoidRootPart")
  1025.  
  1026.  
  1027. local Walk = MakeNewAnim("http://www.roblox.com/asset/?id=180426354")
  1028. local Idle = MakeNewAnim("http://www.roblox.com/asset/?id=180435571")
  1029. local Jump = MakeNewAnim("http://www.roblox.com/asset/?id=125750702")
  1030. local Fall = MakeNewAnim("http://www.roblox.com/asset/?id=180436148")
  1031.  
  1032. local anim = Idle[1]
  1033. local AnimId = Idle[2]
  1034. local Anim = Humanoid:LoadAnimation(anim)
  1035. Anim.Priority = Enum.AnimationPriority.Core
  1036.  
  1037. local rayCast = function(Pos, Dir, Max, Ignore)
  1038.  
  1039. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), (Ignore))
  1040. end
  1041.  
  1042.  
  1043.  
  1044. spawn(function()
  1045. while HumanDied ~= true do
  1046. wait()
  1047. local hitfloor = rayCast(HRP.Position, CFrame.new(HRP.Position, HRP.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
  1048. local oldAnim = Anim
  1049. local oldAnimId = AnimId
  1050. if HRP.Velocity.Y > 0 and hitfloor == nil then
  1051. Anim = Humanoid:LoadAnimation(Jump[1])
  1052. AnimId = Jump[2]
  1053. elseif HRP.Velocity.Y < 0 and hitfloor == nil then
  1054. Anim = Humanoid:LoadAnimation(Fall[1])
  1055. AnimId = Fall[2]
  1056. elseif (HRP.Velocity.X + HRP.Velocity.Z)/2 > 0.1 or (HRP.Velocity.X + HRP.Velocity.Z)/2 < -0.1 then
  1057. Anim = Humanoid:LoadAnimation(Walk[1])
  1058. AnimId = Walk[2]
  1059. else
  1060. Anim = Humanoid:LoadAnimation(Idle[1])
  1061. AnimId = Idle[2]
  1062. end
  1063. if AnimId ~= oldAnimId then
  1064. oldAnim:Stop()
  1065. Anim:Play()
  1066. end
  1067.  
  1068. end
  1069. end)
  1070. end)
  1071.  
  1072. end
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078. CreoFEFakeAnimations(CloneChar)
  1079. CreoFEFakeAnimations(FakeCharacter)
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086. s = game:GetService("RunService").Heartbeat:connect(function()
  1087. game.Players.LocalPlayer.Character.HumanoidRootPart.Velocity = Vector3.new(0,35,0)
  1088. end)
  1089. task.spawn(function()
  1090. while true do
  1091. wait()
  1092. if HumanDied == true then
  1093. s:Disconnect()
  1094. break
  1095. end
  1096. end
  1097. end)
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105. local SHOW = Instance.new("SelectionBox",workspace)
  1106. SHOW.Adornee = game.Players.LocalPlayer.Character.HumanoidRootPart
  1107. --- <<Start Soldier>> --
  1108.  
  1109.  
  1110.  
  1111. bambam = Instance.new("BodyThrust")
  1112. bambam.Parent = HumanRoot
  1113. bambam.Force = Vector3.new(0,0,0)
  1114. ------Body Variables------
  1115. local myHuman = FakeCharacter.Humanoid
  1116. local myTorso = FakeCharacter.Torso
  1117. local myHead = FakeCharacter.Head
  1118. local myFace = myHead.face
  1119. local neck = myTorso.Neck
  1120. local headWeld = myTorso["Head Weld"]
  1121. local rArm = FakeCharacter["Right Arm"]
  1122. local lArm = FakeCharacter["Left Arm"]
  1123. local lShoulder = myTorso["Left Shoulder"]
  1124. local rShoulder = myTorso["Right Shoulder"]
  1125. local lArmWeld = myTorso["Left Arm Weld"]
  1126. local rArmWeld = myTorso["Right Arm Weld"]
  1127. local gyro = FakeCharacter.HumanoidRootPart.BodyGyro
  1128.  
  1129. ------M4 Variables------
  1130. local m4 = FakeCharacter.M4
  1131. if GunHat then
  1132. GunHat.Parent = FakeCharacter
  1133. end
  1134. if SoldierHelm then
  1135. SoldierHelm.Parent = FakeCharacter
  1136. FakeCharacter.Mask.Transparency = 1
  1137. FakeLimbs["Head"].Transparency = 1
  1138. FakeCharacter.fasthelmet.Transparency = 1
  1139. end
  1140.  
  1141.  
  1142. local m4Weld = m4["M4 Weld"]
  1143. local barrel = FakeCharacter.Barrel
  1144. local aimer = FakeCharacter.Aimer
  1145. local aimerWeld = aimer["Aimer Weld"]
  1146. local fullMag = 30
  1147. local mag = fullMag
  1148. local flash = barrel.Attachment.Flash
  1149.  
  1150. ------Knife variables------
  1151. local knife = FakeCharacter.Knife
  1152. local knifeWeld = knife["Knife Weld"]
  1153.  
  1154. ------Grenade variables------
  1155. local grenade = FakeCharacter.Grenade
  1156.  
  1157. ------Sounds------
  1158. local equipSound = m4.Equip
  1159. local fireSound = m4.Fire
  1160. local reloadSound = m4.Reload
  1161. local knifeEquipSound = knife.EquipSound
  1162. local knifeAttackSound = knife.AttackSound
  1163. local knifeStabSound = knife.StabSound
  1164. local hurtSound = myHead.Hurt
  1165. local pinSound = grenade.Pin
  1166.  
  1167. ------Animations------
  1168. local stabAnimation = myHuman:LoadAnimation(FakeCharacter.Stab)
  1169. stabAnimation.Priority = Enum.AnimationPriority.Action
  1170. local throwAnimation = myHuman:LoadAnimation(FakeCharacter.ThrowAnimation)
  1171. throwAnimation.Priority = Enum.AnimationPriority.Action
  1172. throwAnimation.Looped = false
  1173. local reloadAnimation = myHuman:LoadAnimation(FakeCharacter.Reload)
  1174. reloadAnimation.Priority = Enum.AnimationPriority.Action
  1175.  
  1176. ------Status------
  1177. local reloading = false
  1178. local weaponAimed = false
  1179. local weaponCool = true
  1180. local m4Equipped = false
  1181. local knifeEquipped = false
  1182. local grenadeCool = true
  1183. local currentTarget = nil
  1184.  
  1185. local status = "Idle"
  1186. spawn(function()
  1187. while true do
  1188. wait()
  1189. if currentTarget == nil or weaponCool == false then
  1190. HumanRoot.Position = FakeCharacter.Torso.Position
  1191. bambam.Force = Vector3.new(0,0,0)
  1192. end
  1193. end
  1194. end)
  1195. local faces = {Idle = "http://www.roblox.com/asset/?id=23219775",
  1196. Attacking = "http://www.roblox.com/asset/?id=286688505",
  1197. Hunting = "http://www.roblox.com/asset/?id=209715003 ",
  1198. Hurt = "http://www.roblox.com/asset/?id=258192246",
  1199. Dead = "http://www.roblox.com/asset/?id=15426038"}
  1200. local gunPointedAt = nil
  1201.  
  1202. ------Target/Ally Tracking------
  1203. local allies = {"Civilian"}
  1204. local potentialTargets = {}
  1205. local activeAllies = {}
  1206. local team = FakeCharacter.Settings.Team.Value
  1207. local attackPlayers = FakeCharacter.Settings.AttackPlayers.Value
  1208.  
  1209. function spawner(func,...)
  1210. local co = coroutine.wrap(func)
  1211. co(...)
  1212. end
  1213.  
  1214. function checkDist(part1,part2)
  1215. return (part1.Position - part2.Position).Magnitude
  1216. end
  1217.  
  1218. function checkSight(target)
  1219. local ray = Ray.new(barrel.Position, (target.Position - barrel.Position).Unit * 75)
  1220. local part,position = workspace:FindPartOnRayWithIgnoreList(ray, {FakeCharacter})
  1221. local ray2 = Ray.new(myTorso.Position, (target.Position - myTorso.Position).Unit * 75)
  1222. local part2,position2 = workspace:FindPartOnRayWithIgnoreList(ray2, {FakeCharacter})
  1223. if part and part2 then
  1224. if part:IsDescendantOf(target.Parent) and part2:IsDescendantOf(target.Parent) then
  1225. return true
  1226. end
  1227. end
  1228. return false
  1229. end
  1230.  
  1231. function updateFace()
  1232. if myFace.Texture ~= faces.Dead and myFace.Texture ~= faces.Hurt then
  1233. myFace.Texture = faces[status]
  1234. end
  1235. end
  1236.  
  1237. function findTarget()
  1238. local dist = FakeCharacter.Settings.DetectionRange.Value
  1239. local target = nil
  1240. potentialTargets = {}
  1241. local seeTargets = {}
  1242. for _,v in ipairs(workspace:GetChildren()) do
  1243.  
  1244. local human = v:FindFirstChild("Humanoid")
  1245. local torso = v:FindFirstChild("HumanoidRootPart") or v:FindFirstChild("Torso")
  1246. if human and torso and v ~= FakeCharacter and v ~= CloneChar then
  1247.  
  1248. --Check and see if they are on our team, if they are break the loop.
  1249. local targetTeam
  1250. local teammate = false
  1251. if v:FindFirstChild("Team") then
  1252. targetTeam = v.Team.Value
  1253. elseif v:FindFirstChild("Settings") and v.Settings:FindFirstChild("Team") then
  1254. targetTeam = v.Settings.Team.Value
  1255. end
  1256. if (targetTeam and targetTeam == team) or (not attackPlayers and game.Players:GetPlayerFromCharacter(v)) then
  1257. teammate = true
  1258. end
  1259.  
  1260. if (myTorso.Position - torso.Position).magnitude < dist and human.Health > 0 then
  1261. for i,x in ipairs(allies) do
  1262. if x == v.Name or teammate then
  1263. table.insert(activeAllies,torso)
  1264. break
  1265. elseif i == #allies then
  1266. table.insert(potentialTargets,torso)
  1267. end
  1268. end
  1269. end
  1270. end
  1271. end
  1272. if #potentialTargets > 0 then
  1273. for i,v in ipairs(potentialTargets) do
  1274. if checkSight(v) then
  1275. table.insert(seeTargets,v)
  1276. end
  1277. end
  1278. if #seeTargets > 0 then
  1279. for i,v in ipairs(seeTargets) do
  1280. if (myTorso.Position - v.Position).magnitude < dist then
  1281. target = v
  1282. dist = (myTorso.Position - v.Position).magnitude
  1283. end
  1284. end
  1285. else
  1286. for i,v in ipairs(potentialTargets) do
  1287. if (myTorso.Position - v.Position).magnitude < dist then
  1288. target = v
  1289. dist = (myTorso.Position - v.Position).magnitude
  1290. end
  1291. end
  1292. end
  1293. end
  1294. currentTarget = target
  1295. end
  1296.  
  1297. function pathToLocation(target)
  1298. local path = game:GetService("PathfindingService"):CreatePath()
  1299. path:ComputeAsync(myTorso.Position, target.Position)
  1300. local waypoints = path:GetWaypoints()
  1301.  
  1302. for _,waypoint in ipairs(waypoints) do
  1303. if waypoint.Action == Enum.PathWaypointAction.Jump then
  1304. myHuman.Jump = true
  1305. end
  1306. myHuman:MoveTo(waypoint.Position)
  1307. spawner(function()
  1308. wait(0.5)
  1309. if myHuman.WalkToPoint.Y > myTorso.Position.Y then
  1310. myHuman.Jump = true
  1311. end
  1312. end)
  1313. local moveSuccess = myHuman.MoveToFinished:Wait()
  1314. if not moveSuccess or not target.Parent or (checkDist(myTorso,target) < 30 and checkSight(target)) or currentTarget ~= target then
  1315. break
  1316. end
  1317. if checkDist(target,waypoints[#waypoints]) > 30 then
  1318. pathToLocation(target)
  1319. end
  1320. end
  1321. end
  1322.  
  1323. function walkRandom()
  1324. local randX = math.random(-100,100)
  1325. local randZ = math.random(-100,100)
  1326. local goal = myTorso.Position + Vector3.new(randX, 0, randZ)
  1327. local path = game:GetService("PathfindingService"):CreatePath()
  1328. path:ComputeAsync(myTorso.Position, goal)
  1329. local waypoints = path:GetWaypoints()
  1330.  
  1331. if path.Status == Enum.PathStatus.Success then
  1332. for i,waypoint in ipairs(waypoints) do
  1333. if waypoint.Action == Enum.PathWaypointAction.Jump then
  1334. myHuman.Jump = true
  1335. end
  1336. myHuman:MoveTo(waypoint.Position)
  1337. spawner(function()
  1338. wait(0.5)
  1339. if myHuman.WalkToPoint.Y > myTorso.Position.Y then
  1340. myHuman.Jump = true
  1341. end
  1342. end)
  1343. local moveSuccess = myHuman.MoveToFinished:Wait()
  1344. if not moveSuccess or currentTarget then
  1345. break
  1346. end
  1347. end
  1348. else
  1349. wait(2)
  1350. end
  1351. end
  1352.  
  1353. function drawM4()
  1354. yieldKnife()
  1355. if m4Equipped == false then
  1356. m4Equipped = true
  1357. equipSound:Play()
  1358.  
  1359. --Right Arm Setup
  1360. rShoulder.Part1 = nil
  1361. rArm.CFrame = aimer.CFrame * CFrame.new(1.25,0.05,-0.65) * CFrame.Angles(math.rad(80),math.rad(0),math.rad(-10))
  1362. rArmWeld.Part1 = rArm
  1363.  
  1364. --Left Arm Setup
  1365. lShoulder.Part1 = nil
  1366. lArm.CFrame = aimer.CFrame * CFrame.new(-0.35,0.05,-1.48) * CFrame.Angles(math.rad(84),math.rad(-3),math.rad(28))
  1367. lArmWeld.Part1 = lArm
  1368.  
  1369. --M4 Setup
  1370. m4Weld.Part0 = nil
  1371. m4.CFrame = aimer.CFrame * CFrame.new(0.65,0.37,-2.22) * CFrame.Angles(math.rad(-90),math.rad(0),math.rad(0))
  1372. m4Weld.Part0 = aimer
  1373. end
  1374. end
  1375.  
  1376. function yieldM4()
  1377. myHuman.AutoRotate = true
  1378. gyro.MaxTorque = Vector3.new(0,0,0)
  1379. if weaponAimed == true then
  1380. weaponAimed = false
  1381. resetHead()
  1382. end
  1383. if m4Equipped == true then
  1384. m4Equipped = false
  1385. equipSound:Play()
  1386.  
  1387. --Right Arm setup
  1388. rArmWeld.Part1 = nil
  1389. rShoulder.Part1 = rArm
  1390.  
  1391. --Left Arm Setup
  1392. lArmWeld.Part1 = nil
  1393. lShoulder.Part1 = lArm
  1394.  
  1395. --M4 Setup
  1396. m4Weld.Part0 = nil
  1397. m4.CFrame = myTorso.CFrame * CFrame.new(0,0,0.6) * CFrame.Angles(math.rad(-90),math.rad(-60),math.rad(90))
  1398. m4Weld.Part0 = myTorso
  1399. end
  1400. end
  1401.  
  1402. function drawKnife()
  1403. if knifeEquipped == false then
  1404. yieldM4()
  1405. knifeEquipSound:Play()
  1406. knifeEquipped = true
  1407. knifeWeld.Part0 = nil
  1408. knife.CFrame = rArm.CFrame * CFrame.new(0,-1,-1) * CFrame.Angles(math.rad(90),math.rad(180),math.rad(180))
  1409. knifeWeld.Part0 = rArm
  1410. end
  1411. end
  1412.  
  1413. function yieldKnife()
  1414. if knifeEquipped == true then
  1415. knifeEquipped = false
  1416. knifeWeld.Part0 = nil
  1417. knife.CFrame = myTorso.CFrame * CFrame.new(-1,-1,0.5) * CFrame.Angles(math.rad(-65),0,math.rad(180))
  1418. knifeWeld.Part0 = myTorso
  1419. end
  1420. end
  1421.  
  1422. function aim(target)
  1423. if weaponAimed == false then
  1424. game:GetService("TweenService"):Create(neck,TweenInfo.new(0.5),{C0 = neck.C0 * CFrame.Angles(0,math.rad(-15),0)}):Play()
  1425. end
  1426.  
  1427. myHuman.AutoRotate = false
  1428.  
  1429. weaponAimed = true
  1430.  
  1431. gyro.CFrame = CFrame.new(myTorso.Position,target.Position)
  1432. gyro.MaxTorque = Vector3.new(0,math.huge,0)
  1433. if not reloading then
  1434.  
  1435. local aimCFrame = CFrame.new(aimer.Position,target.Position)
  1436. aimCFrame = aimCFrame - aimCFrame.Position
  1437. local negateCFrame = myTorso.CFrame - myTorso.Position
  1438. local newC0 = CFrame.new(0,0.5,0) * negateCFrame:Inverse() * aimCFrame
  1439. local x,y,z = newC0:ToEulerAnglesXYZ()
  1440. x = math.clamp(x,-0.8,0.8) --So his aiming isn't crazy backwards
  1441. newC0 = CFrame.new(0,0.5,0) * CFrame.fromEulerAnglesXYZ(x,0,0)
  1442. local lookDiff = (newC0.LookVector - aimerWeld.C0.LookVector).Magnitude
  1443. game:GetService("TweenService"):Create(aimerWeld,TweenInfo.new(lookDiff * 0.2),{C0 = newC0}):Play()
  1444.  
  1445.  
  1446. local newC0 = CFrame.new(0,1,0) * CFrame.Angles(-1.5 + math.rad(aimer.Orientation.X),math.rad(15),math.rad(180)) ---1.5 -
  1447. game:GetService("TweenService"):Create(neck,TweenInfo.new(lookDiff * 0.2),{C0 = newC0}):Play()
  1448. wait(lookDiff*0.2)
  1449. end
  1450. end
  1451.  
  1452.  
  1453. function resetHead()
  1454. game:GetService("TweenService"):Create(neck,TweenInfo.new(0.5),{C0 = CFrame.new(0,1,0) * CFrame.Angles(math.rad(-90),0,math.rad(180))}):Play()
  1455. end
  1456.  
  1457. function shoot(target)
  1458. if weaponCool == true and reloading == false then
  1459. weaponCool = false
  1460.  
  1461. local shot
  1462. if checkDist(target,myTorso) > 60 then
  1463. shot = 1
  1464. else
  1465. shot = 3
  1466. end
  1467. for i = 1, shot do
  1468. wait(0.1)
  1469. mag = mag - 1
  1470.  
  1471. flash:Emit(1)
  1472. local flash = Instance.new("PointLight",barrel)
  1473. flash.Brightness = 3
  1474. game:GetService("Debris"):AddItem(flash,0.1)
  1475.  
  1476. local bullet = Instance.new("Part")
  1477. bullet.Size = Vector3.new(0.1,0.1,0.3)
  1478. bullet.BrickColor = BrickColor.new("Gold")
  1479. bullet.Material = Enum.Material.Neon
  1480. bullet.CFrame = barrel.CFrame
  1481. bullet.CanCollide = false
  1482. bullet.Touched:Connect(function(obj)
  1483. if not obj:IsDescendantOf(FakeCharacter) then
  1484. local human = obj.Parent:FindFirstChild("Humanoid")
  1485. if human then
  1486. for i = 1,30 do
  1487. wait()
  1488. HumanRoot.Position = obj.Parent:WaitForChild("HumanoidRootPart").Position
  1489. bambam.Location = obj.Parent:WaitForChild("HumanoidRootPart").Position
  1490. bambam.Force = Vector3.new(1000,0,1000)
  1491. findTarget()
  1492. end
  1493. end
  1494. bullet:Destroy()
  1495. end
  1496. end)
  1497. bullet.Parent = workspace
  1498. fireSound:Play()
  1499.  
  1500. local spread = Vector3.new(math.random(-shot,shot)/100,math.random(-shot,shot)/100,math.random(-shot,shot)/100)
  1501.  
  1502. local bv = Instance.new("BodyVelocity",bullet)
  1503. bv.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  1504. bv.Velocity = (aimer.CFrame.LookVector + spread) * 300
  1505.  
  1506. local s = Instance.new("Sound",bullet)
  1507. s.Volume = 0.7
  1508. s.PlaybackSpeed = 7
  1509. s.Looped = true
  1510. s.SoundId = "rbxasset://sounds/Rocket whoosh 01.wav"
  1511. s:Play()
  1512.  
  1513. local a1 = Instance.new("Attachment",bullet)
  1514. a1.Position = Vector3.new(0,0.05,0)
  1515. local a2 = Instance.new("Attachment",bullet)
  1516. a2.Position = Vector3.new(0,-0.05,0)
  1517.  
  1518. local t = Instance.new("Trail",bullet)
  1519. t.Attachment0 = a1
  1520. t.Attachment1 = a2
  1521. t.Color = ColorSequence.new(bullet.Color)
  1522. t.WidthScale = NumberSequence.new(0.1,0.01)
  1523. t.Lifetime = 0.3
  1524.  
  1525. --TODO ADD KICK
  1526.  
  1527. game:GetService("Debris"):AddItem(bullet, 5)
  1528. end
  1529.  
  1530. if mag <= 0 then
  1531. reload()
  1532. end
  1533.  
  1534. spawner(function()
  1535. wait(1)
  1536. weaponCool = true
  1537. end)
  1538. end
  1539. end
  1540.  
  1541.  
  1542. function reload()
  1543. if weaponAimed == true then
  1544. resetHead()
  1545. weaponAimed = false
  1546. end
  1547. reloadSound:Play()
  1548. reloading = true
  1549.  
  1550. yieldM4()
  1551. m4Weld.Part0 = nil
  1552. m4.CFrame = lArm.CFrame * CFrame.new(0.6,-1.3,0.2) * CFrame.Angles(math.rad(180),0,0)
  1553. m4Weld.Part0 = lArm
  1554.  
  1555. reloadAnimation:Play()
  1556. reloadAnimation:AdjustSpeed(3)
  1557. reloadAnimation.Stopped:Wait()
  1558. reloading = false
  1559. mag = fullMag
  1560. drawM4()
  1561. end
  1562.  
  1563. function stab(target)
  1564. if weaponCool == true then
  1565. weaponCool = false
  1566.  
  1567. knifeStabSound:Play()
  1568. knifeAttackSound:Play()
  1569. stabAnimation:Play()
  1570. local human = target.Parent.Humanoid
  1571. HumanRoot.Position = target.Parent:WaitForChild("HumanoidRootPart").Position
  1572. bambam.Location = target.Parent:WaitForChild("HumanoidRootPart").Position
  1573. bambam.Force = Vector3.new(500,0,500)
  1574.  
  1575. spawner(function()
  1576. wait(0.5)
  1577. weaponCool = true
  1578. end)
  1579. end
  1580. end
  1581.  
  1582. function yieldWeapons()
  1583. yieldKnife()
  1584. yieldM4()
  1585. if weaponAimed == true then
  1586. weaponAimed = false
  1587. resetHead()
  1588. end
  1589. end
  1590.  
  1591. function checkCluster(target)
  1592. --Check for nearby allies
  1593. for i,v in ipairs(activeAllies) do
  1594. if checkDist(target,v) < 30 then
  1595. return false
  1596. end
  1597. end
  1598. --Check if enemies are paired close together
  1599. for i,v in ipairs(potentialTargets) do
  1600. if v ~= target then
  1601. if checkDist(target,v) < 15 then
  1602. return true
  1603. end
  1604. end
  1605. end
  1606. return false
  1607. end
  1608.  
  1609. function throwGrenade(target)
  1610. if weaponCool == true and grenadeCool == true then
  1611. weaponCool = false
  1612. grenadeCool = false
  1613. yieldWeapons()
  1614. local g = grenade:Clone()
  1615. g.Boom.PlayOnRemove = true
  1616. g.Parent = workspace
  1617. g.CanCollide = true
  1618. g.CFrame = rArm.CFrame * CFrame.new(0,-1.3,0) * CFrame.Angles(0,0,math.rad(90))
  1619. game:GetService("Debris"):AddItem(g,5)
  1620.  
  1621. grenade.Transparency = 1
  1622.  
  1623. local w = Instance.new("WeldConstraint",g)
  1624. w.Part0 = rArm
  1625. w.Part1 = g
  1626.  
  1627. throwAnimation:Play()
  1628. pinSound:Play()
  1629.  
  1630. aim(target)
  1631.  
  1632.  
  1633. wait(0.4)
  1634.  
  1635. if myHuman.Health <= 0 then
  1636. return
  1637. end
  1638.  
  1639. aim(target)
  1640.  
  1641. throwAnimation:Stop()
  1642.  
  1643. w.Part1 = nil
  1644. local dist = checkDist(myTorso,target)
  1645. g.Velocity = (myTorso.CFrame.LookVector + Vector3.new(0,1,0)) * Vector3.new(dist,dist*1.5,dist)
  1646.  
  1647. --Wait until grenade is thrown before it can be primed
  1648. touched = g.Touched:Connect(function(obj)
  1649. if not obj:IsDescendantOf(FakeCharacter) then
  1650. touched:Disconnect()
  1651. g.Pin:Play()
  1652. wait(0.5)
  1653. local x = Instance.new("Explosion",workspace)
  1654. x.Position = g.Position
  1655. x.Hit:Connect(function(obj,dist)
  1656. local human = obj.Parent:FindFirstChild("Humanoid")
  1657. if human then
  1658. human:TakeDamage(20 - dist)
  1659. human:ChangeState(Enum.HumanoidStateType.Ragdoll)
  1660. end
  1661. end)
  1662. g:Destroy()
  1663. game:GetService("Debris"):AddItem(x,2)
  1664. end
  1665. end)
  1666.  
  1667. local attach0 = g.Attach0
  1668. local attach1 = g.Attach1
  1669. local t = Instance.new("Trail",g)
  1670. t.Attachment0 = attach0
  1671. t.Attachment1 = attach1
  1672. t.Lifetime = 0.5
  1673. t.Color = ColorSequence.new(Color3.fromRGB(150,150,150))
  1674. t.WidthScale = NumberSequence.new(1,0)
  1675.  
  1676. spawner(function()
  1677. wait(1)
  1678. weaponCool = true
  1679. wait(5)
  1680. grenadeCool = true
  1681. grenade.Transparency = 0
  1682. end)
  1683. end
  1684. end
  1685.  
  1686. function movementLoop()
  1687. while myHuman.Health>0 do
  1688. if currentTarget then
  1689. if checkDist(currentTarget,myTorso) > 30 or not checkSight(currentTarget) then
  1690. pathToLocation(currentTarget)
  1691. elseif checkDist(currentTarget,myTorso) > 8 then
  1692. if math.random(0,1) == 1 then
  1693. myHuman:Move(myTorso.CFrame.RightVector)
  1694. else
  1695. myHuman:Move(-myTorso.CFrame.RightVector)
  1696. end
  1697. wait(0.5)
  1698. end
  1699. else
  1700. local randomAction = math.random(4)
  1701. if randomAction == 3 then
  1702. walkRandom()
  1703. elseif randomAction == 2 then
  1704. --print("Look randomly")
  1705. end
  1706. wait(3)
  1707. end
  1708. wait(0.1)
  1709. end
  1710. end
  1711.  
  1712. function searchTargetLoop()
  1713. while myHuman.Health>0 do
  1714. findTarget()
  1715. wait(3)
  1716. end
  1717. end
  1718.  
  1719. function aimingLoop()
  1720. while myHuman.Health>0 do
  1721. if currentTarget then
  1722. if checkSight(currentTarget) then
  1723. aim(currentTarget)
  1724. gunPointedAt = currentTarget
  1725. else
  1726. wait(0.5)
  1727. end
  1728. else
  1729. wait(2)
  1730. end
  1731. wait()
  1732. end
  1733. end
  1734.  
  1735. function attackLoop()
  1736. while myHuman.Health>0 do
  1737. if currentTarget then
  1738. status = "Hunting"
  1739. updateFace()
  1740. if checkSight(currentTarget) then
  1741. status = "Attacking"
  1742. updateFace()
  1743. local distance = checkDist(myTorso,currentTarget)
  1744. if distance > 15 then
  1745. if checkCluster(currentTarget) == true and distance < 100 and distance > 30 and grenadeCool then
  1746. throwGrenade(currentTarget)
  1747. else
  1748. drawM4()
  1749. repeat
  1750. wait()
  1751. until gunPointedAt == currentTarget
  1752. shoot(currentTarget)
  1753. end
  1754. else
  1755. drawKnife()
  1756. myHuman:MoveTo(currentTarget.Position)
  1757. local canStab = false
  1758. for i,v in pairs(currentTarget.Parent:GetChildren()) do
  1759. if v:IsA("BasePart") and checkDist(v,myTorso) < 7 then
  1760. canStab = true
  1761. end
  1762. end
  1763. if canStab then
  1764. stab(currentTarget)
  1765. end
  1766. end
  1767. else
  1768. if weaponAimed == true then
  1769. weaponAimed = false
  1770. myHuman.AutoRotate = true
  1771. gyro.MaxTorque = Vector3.new(0,0,0)
  1772. resetHead()
  1773. local newC0 = CFrame.new(0,0.5,0) * CFrame.Angles(-0.5,0,0)
  1774. local lookDiff = (newC0.LookVector - aimerWeld.C0.LookVector).Magnitude
  1775. game:GetService("TweenService"):Create(aimerWeld,TweenInfo.new(lookDiff * 0.2),{C0 = newC0}):Play()
  1776. end
  1777. end
  1778. else
  1779. status = "Idle"
  1780. updateFace()
  1781. yieldWeapons()
  1782. wait(2)
  1783. end
  1784. wait(0.1)
  1785. end
  1786. end
  1787.  
  1788. function Died()
  1789. FakeCharacter:Destroy()
  1790. CloneChar:Destroy()
  1791. game.Players.LocalPlayer.Character:Destroy()
  1792. end
  1793.  
  1794. myHuman.Died:Connect(Died)
  1795.  
  1796. local oldHealth = myHuman.Health
  1797. local soundSpeeds = {0.9,0.95,1,1.05,1.1}
  1798. myHuman.HealthChanged:Connect(function(health)
  1799. if health < oldHealth and hurtSound.IsPlaying == false then
  1800. hurtSound.PlaybackSpeed = soundSpeeds[math.random(#soundSpeeds)]
  1801. hurtSound:Play()
  1802. spawner(function()
  1803. myFace.Texture = faces.Hurt
  1804. wait(1)
  1805. if myFace.Texture == faces.Hurt then
  1806. myFace.Texture = faces[status]
  1807. end
  1808. end)
  1809. end
  1810. oldHealth = health
  1811. end)
  1812.  
  1813. spawner(searchTargetLoop)
  1814. spawner(attackLoop)
  1815. spawner(movementLoop)
  1816. spawner(aimingLoop)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement