Advertisement
KrYn0MoRe

artificial char anti death

Apr 24th, 2020
1,413
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 31.44 KB | None | 0 0
  1. local plr = owner
  2. local char = plr.Character
  3. local torso = char:FindFirstChild('Torso') or char:FindFirstChild('HumanoidRootPart')
  4. local hum = nil
  5. local saved_tools = _G[plr.Name .. ' tools anti death']
  6. local shirt = ''
  7. local pants = ''
  8. local bodyColors = {
  9.     leftArmColorId = nil,
  10.     torsoColorId = nil,
  11.     rightArmColorId = nil,
  12.     headColorId = nil,
  13.     leftLegColorId = nil,
  14.     rightLegColorId = nil
  15. }
  16.  
  17. local cdata = game:GetService("Players"):GetCharacterAppearanceInfoAsync(plr.UserId)
  18. bodyColors = cdata.bodyColors
  19.  
  20. if not char then
  21.     plr:LoadCharacter()
  22.     wait()
  23. end
  24. if char then
  25.     local _shirt = char:FindFirstChild('Shirt')
  26.     if _shirt then
  27.         shirt = _shirt.ShirtTemplate
  28.     end
  29.     local _pants = char:FindFirstChild('Pants')
  30.     if _pants then
  31.         pants = _pants.PantsTemplate
  32.     end
  33. end
  34.  
  35. if saved_tools then
  36.     saved_tools:Destroy()
  37. end
  38.  
  39. _G[plr.Name .. ' tools anti death'] = Instance.new("Folder")
  40. saved_tools = _G[plr.Name .. ' tools anti death']
  41.  
  42. script.Parent = game:GetService("ServerScriptService")
  43.  
  44. function make_char()
  45. --spawn(function()
  46. char = Instance.new("Model")
  47. head = Instance.new("Part")
  48. local SpecialMesh2 = Instance.new("SpecialMesh")
  49. local Decal3 = Instance.new("Decal")
  50. torso = Instance.new("Part")
  51. local Decal5 = Instance.new("Decal")
  52. local Motor6 = Instance.new("Motor")
  53. local Motor7 = Instance.new("Motor")
  54. local Motor8 = Instance.new("Motor")
  55. local Motor9 = Instance.new("Motor")
  56. local Motor10 = Instance.new("Motor")
  57. local larm = Instance.new("Part")
  58. local rarm = Instance.new("Part")
  59. local lleg = Instance.new("Part")
  60. local rleg = Instance.new("Part")
  61. hum = Instance.new("Humanoid")
  62. local CFrameValue16 = Instance.new("CFrameValue")
  63. local BoolValue17 = Instance.new("BoolValue")
  64. local IntValue18 = Instance.new("IntValue")
  65. local BoolValue19 = Instance.new("BoolValue")
  66. local BrickColorValue20 = Instance.new("BrickColorValue")
  67. local BoolValue21 = Instance.new("BoolValue")
  68. local BoolValue22 = Instance.new("BoolValue")
  69. local BoolValue23 = Instance.new("BoolValue")
  70. local Vector3Value24 = Instance.new("Vector3Value")
  71. local BoolValue25 = Instance.new("BoolValue")
  72. local BoolValue26 = Instance.new("BoolValue")
  73. local BodyColors27 = Instance.new("BodyColors")
  74. local BoolValue28 = Instance.new("BoolValue")
  75. local IntValue30 = Instance.new("IntValue")
  76. local IntValue31 = Instance.new("IntValue")
  77. local IntValue32 = Instance.new("IntValue")
  78. char.Name = game:GetService("HttpService"):GenerateGUID(false) or '' -- character name
  79. char.Parent = workspace
  80. char.PrimaryPart = head
  81. head.Name = "Head"
  82. head.Parent = char
  83. head.CFrame = CFrame.new(-6.13871098, 4.49999905, -11.4352522, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  84. head.Position = Vector3.new(-6.13871098, 4.49999905, -11.4352522)
  85. head.Color = Color3.new(0.643137, 0.741176, 0.278431)
  86. head.Size = Vector3.new(2, 1, 1)
  87. head.BrickColor = BrickColor.new("Br. yellowish green")
  88. head.TopSurface = Enum.SurfaceType.Smooth
  89. head.brickColor = BrickColor.new("Br. yellowish green")
  90. head.FormFactor = Enum.FormFactor.Symmetric
  91. head.formFactor = Enum.FormFactor.Symmetric
  92. SpecialMesh2.Parent = head
  93. SpecialMesh2.Scale = Vector3.new(1.25, 1.25, 1.25)
  94. Decal3.Name = "face"
  95. Decal3.Parent = head
  96. Decal3.Texture = "http://www.roblox.com/asset/?id=8560915"
  97. torso.Name = "Torso"
  98. torso.Parent = char
  99. torso.CFrame = CFrame.new(-6.13871098, 2.99999905, -11.4352522, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  100. torso.Position = Vector3.new(-6.13871098, 2.99999905, -11.4352522)
  101. torso.Color = Color3.new(1, 1, 0)
  102. torso.Size = Vector3.new(2, 2, 1)
  103. torso.BrickColor = BrickColor.new("New Yeller")
  104. torso.LeftParamA = 0
  105. torso.LeftParamB = 0
  106. torso.LeftSurface = Enum.SurfaceType.Weld
  107. torso.RightParamA = 0
  108. torso.RightParamB = 0
  109. torso.RightSurface = Enum.SurfaceType.Weld
  110. torso.brickColor = BrickColor.new("New Yeller")
  111. torso.FormFactor = Enum.FormFactor.Symmetric
  112. torso.formFactor = Enum.FormFactor.Symmetric
  113. Decal5.Name = "roblox"
  114. Decal5.Parent = torso
  115. Motor6.Name = "Right Shoulder"
  116. Motor6.Parent = torso
  117. Motor6.MaxVelocity = 0.15000000596046
  118. Motor6.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  119. Motor6.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  120. Motor6.Part0 = torso
  121. Motor6.Part1 = rarm
  122. Motor6.Part1 = rarm
  123. Motor7.Name = "Left Shoulder"
  124. Motor7.Parent = torso
  125. Motor7.MaxVelocity = 0.15000000596046
  126. Motor7.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  127. Motor7.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  128. Motor7.Part0 = torso
  129. Motor7.Part1 = larm
  130. Motor7.Part1 = larm
  131. Motor8.Name = "Right Hip"
  132. Motor8.Parent = torso
  133. Motor8.MaxVelocity = 0.10000000149012
  134. Motor8.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  135. Motor8.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  136. Motor8.Part0 = torso
  137. Motor8.Part1 = rleg
  138. Motor8.Part1 = rleg
  139. Motor9.Name = "Left Hip"
  140. Motor9.Parent = torso
  141. Motor9.MaxVelocity = 0.10000000149012
  142. Motor9.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  143. Motor9.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  144. Motor9.Part0 = torso
  145. Motor9.Part1 = lleg
  146. Motor9.Part1 = lleg
  147. Motor10.Name = "Neck"
  148. Motor10.Parent = torso
  149. Motor10.MaxVelocity = 0.10000000149012
  150. Motor10.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  151. Motor10.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  152. Motor10.Part0 = torso
  153. Motor10.Part1 = head
  154. Motor10.Part1 = head
  155. larm.Name = "Left Arm"
  156. larm.Parent = char
  157. larm.CFrame = CFrame.new(-7.63871098, 2.99999905, -11.4352522, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  158. larm.Position = Vector3.new(-7.63871098, 2.99999905, -11.4352522)
  159. larm.Color = Color3.new(0.643137, 0.741176, 0.278431)
  160. larm.Size = Vector3.new(1, 2, 1)
  161. larm.BrickColor = BrickColor.new("Br. yellowish green")
  162. larm.CanCollide = false
  163. larm.brickColor = BrickColor.new("Br. yellowish green")
  164. larm.FormFactor = Enum.FormFactor.Symmetric
  165. larm.formFactor = Enum.FormFactor.Symmetric
  166. rarm.Name = "Right Arm"
  167. rarm.Parent = char
  168. rarm.CFrame = CFrame.new(-4.63871098, 2.99999905, -11.4352522, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  169. rarm.Position = Vector3.new(-4.63871098, 2.99999905, -11.4352522)
  170. rarm.Color = Color3.new(0.643137, 0.741176, 0.278431)
  171. rarm.Size = Vector3.new(1, 2, 1)
  172. rarm.BrickColor = BrickColor.new("Br. yellowish green")
  173. rarm.CanCollide = false
  174. rarm.brickColor = BrickColor.new("Br. yellowish green")
  175. rarm.FormFactor = Enum.FormFactor.Symmetric
  176. rarm.formFactor = Enum.FormFactor.Symmetric
  177. lleg.Name = "Left Leg"
  178. lleg.Parent = char
  179. lleg.CFrame = CFrame.new(-6.63871098, 0.999999046, -11.4352522, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  180. lleg.Position = Vector3.new(-6.63871098, 0.999999046, -11.4352522)
  181. lleg.Color = Color3.new(1, 1, 0)
  182. lleg.Size = Vector3.new(1, 2, 1)
  183. lleg.BottomSurface = Enum.SurfaceType.Smooth
  184. lleg.BrickColor = BrickColor.new("New Yeller")
  185. lleg.CanCollide = false
  186. lleg.TopSurface = Enum.SurfaceType.Inlet
  187. lleg.brickColor = BrickColor.new("New Yeller")
  188. lleg.FormFactor = Enum.FormFactor.Symmetric
  189. lleg.formFactor = Enum.FormFactor.Symmetric
  190. rleg.Name = "Right Leg"
  191. rleg.Parent = char
  192. rleg.CFrame = CFrame.new(-5.63871098, 0.999999046, -11.4352522, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  193. rleg.Position = Vector3.new(-5.63871098, 0.999999046, -11.4352522)
  194. rleg.Color = Color3.new(1, 1, 0)
  195. rleg.Size = Vector3.new(1, 2, 1)
  196. rleg.BottomSurface = Enum.SurfaceType.Smooth
  197. rleg.BrickColor = BrickColor.new("New Yeller")
  198. rleg.CanCollide = false
  199. rleg.TopSurface = Enum.SurfaceType.Inlet
  200. rleg.brickColor = BrickColor.new("New Yeller")
  201. rleg.FormFactor = Enum.FormFactor.Symmetric
  202. rleg.formFactor = Enum.FormFactor.Symmetric
  203. hum.Parent = char
  204. hum.LeftLeg = lleg
  205. hum.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
  206. hum.HealthDisplayType = Enum.HumanoidHealthDisplayType.AlwaysOff
  207. hum.NameOcclusion = Enum.NameOcclusion.NoOcclusion
  208. hum.RightLeg = rleg
  209. hum.Torso = torso
  210. CFrameValue16.Name = "IsAPlayer"
  211. CFrameValue16.Parent = char
  212. BoolValue17.Name = "Respawn"
  213. BoolValue17.Parent = char
  214. BoolValue17.Value = true
  215. IntValue18.Name = "Force_Weapon"
  216. IntValue18.Parent = char
  217. BoolValue19.Name = "IsOnTeam"
  218. BoolValue19.Parent = char
  219. BrickColorValue20.Name = "Team"
  220. BrickColorValue20.Parent = BoolValue19
  221. BrickColorValue20.Value = BrickColor.new("Really black")
  222. BoolValue21.Name = "ShowTag"
  223. BoolValue21.Parent = BoolValue19
  224. BoolValue22.Name = "IgnoreCombatFF"
  225. BoolValue22.Parent = char
  226. BoolValue22.Value = true
  227. BoolValue23.Name = "DropWeapon"
  228. BoolValue23.Parent = char
  229. BoolValue23.Value = true
  230. Vector3Value24.Name = "PathTo"
  231. Vector3Value24.Parent = char
  232. BoolValue25.Name = "Wander"
  233. BoolValue25.Parent = char
  234. BoolValue25.Value = true
  235. BoolValue26.Name = "PrintMap"
  236. BoolValue26.Parent = char
  237. BodyColors27.Parent = char
  238. BodyColors27.HeadColor = BrickColor.new(bodyColors.headColorId) or BrickColor.new("Br. yellowish green")
  239. BodyColors27.LeftArmColor = BrickColor.new(bodyColors.leftArmColorId) or BrickColor.new("Br. yellowish green")
  240. BodyColors27.LeftLegColor = BrickColor.new(bodyColors.leftLegColorId) or BrickColor.new("New Yeller")
  241. BodyColors27.RightArmColor = BrickColor.new(bodyColors.rightArmColorId) or BrickColor.new("Br. yellowish green")
  242. BodyColors27.RightLegColor = BrickColor.new(bodyColors.rightLegColorId) or BrickColor.new("New Yeller")
  243. BodyColors27.TorsoColor = BrickColor.new(bodyColors.torsoColorId) or BrickColor.new("New Yeller")
  244. BoolValue28.Name = "ForceColors"
  245. BoolValue28.Parent = BodyColors27
  246.  
  247. local Hat0 = Instance.new("Hat")
  248. local Part1 = Instance.new("Part")
  249. local SpecialMesh2 = Instance.new("SpecialMesh")
  250. local Hat3 = Instance.new("Hat")
  251. local Part4 = Instance.new("Part")
  252. local SpecialMesh5 = Instance.new("SpecialMesh")
  253. Hat0.Name = "ClockworksShades"
  254. Hat0.Parent = char
  255. Hat0.AttachmentPoint = CFrame.new(0, 0.25999999, 0.150000006, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  256. Hat0.AttachmentPos = Vector3.new(0, 0.25999999, 0.150000006)
  257. Part1.Name = "Handle"
  258. Part1.Parent = Hat0
  259. Part1.CFrame = CFrame.new(6.14723778, 4.73999882, -13.5720253, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  260. Part1.Position = Vector3.new(6.14723778, 4.73999882, -13.5720253)
  261. Part1.Size = Vector3.new(1, 1.60000002, 1)
  262. Part1.BottomSurface = Enum.SurfaceType.Smooth
  263. Part1.CanCollide = false
  264. Part1.Locked = true
  265. Part1.TopSurface = Enum.SurfaceType.Smooth
  266. Part1.FormFactor = Enum.FormFactor.Plate
  267. Part1.formFactor = Enum.FormFactor.Plate
  268. SpecialMesh2.Parent = Part1
  269. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=1577360"
  270. SpecialMesh2.Scale = Vector3.new(1, 1.29999995, 1)
  271. SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=1577349"
  272. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  273. Hat3.Name = "DominoCrown"
  274. Hat3.Parent = char
  275. Hat3.AttachmentPoint = CFrame.new(0, -0.449999988, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  276. Hat3.AttachmentPos = Vector3.new(0, -0.449999988, 0)
  277. Part4.Name = "Handle"
  278. Part4.Parent = Hat3
  279. Part4.CFrame = CFrame.new(6.14723778, 5.44999886, -13.4220257, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  280. Part4.Position = Vector3.new(6.14723778, 5.44999886, -13.4220257)
  281. Part4.Size = Vector3.new(1, 0.800000012, 1)
  282. Part4.BottomSurface = Enum.SurfaceType.Smooth
  283. Part4.CanCollide = false
  284. Part4.Locked = true
  285. Part4.TopSurface = Enum.SurfaceType.Smooth
  286. Part4.FormFactor = Enum.FormFactor.Plate
  287. Part4.formFactor = Enum.FormFactor.Plate
  288. SpecialMesh5.Parent = Part4
  289. SpecialMesh5.MeshId = "http://www.roblox.com/asset/?id=1031410"
  290. SpecialMesh5.Scale = Vector3.new(1.10000002, 1.10000002, 1.10000002)
  291. SpecialMesh5.TextureId = "http://www.roblox.com/asset/?id=1031417"
  292. SpecialMesh5.MeshType = Enum.MeshType.FileMesh
  293.  
  294. if shirt ~= '' then
  295.     local _shirt = Instance.new("Shirt")
  296.     _shirt.ShirtTemplate = shirt
  297.     _shirt.Parent = char
  298. end
  299. if pants ~= '' then
  300.     local _pants = Instance.new("Pants")
  301.     _pants.PantsTemplate =  pants
  302.     _pants.Parent = char
  303. end
  304.  
  305. plr.Character = char
  306. set_owner()
  307.  
  308. --Delay(0, function() --Vanilla Sound
  309.     function waitForChild(parent, childName)
  310.         local child = parent:findFirstChild(childName)
  311.         if child then return child end
  312.         spawn(function()
  313.             while true do
  314.                 child = parent.ChildAdded:wait()
  315.                 if child.Name==childName then return child end
  316.             end
  317.         end)
  318.     end
  319.     function newSound(id)
  320.         local sound = Instance.new("Sound")
  321.         sound.SoundId = id
  322.         sound.archivable = false
  323.         sound.Parent = head
  324.         return sound
  325.     end
  326.     local sDied = newSound("rbxasset://sounds/uuhhh.wav")
  327.     local sFallingDown = newSound("rbxasset://sounds/splat.wav")
  328.     local sFreeFalling = newSound("rbxasset://sounds/swoosh.wav")
  329.     local sGettingUp = newSound("rbxasset://sounds/hit.wav")
  330.     local sJumping = newSound("rbxasset://sounds/button.wav")
  331.     local sRunning = newSound("rbxasset://sounds/bfsl-minifigfoots1.mp3")
  332.     sRunning.Looped = true
  333.     local Figure = char
  334.     local Head = waitForChild(Figure, "Head")
  335.     local Humanoid = waitForChild(Figure, "Humanoid")
  336.     function onDied()
  337.         sDied:Play()
  338.     end
  339.     function onState(state, sound)
  340.         if state then
  341.             sound:Play()
  342.         else
  343.             sound:Pause()
  344.         end
  345.     end
  346.     function onRunning(speed)
  347.         if speed>0 then
  348.             sRunning:Play()
  349.         else
  350.             sRunning:Pause()
  351.         end
  352.     end
  353.     Humanoid.Died:connect(onDied)
  354.     Humanoid.Running:connect(onRunning)
  355.     Humanoid.Jumping:connect(function(state) onState(state, sJumping) end)
  356.     Humanoid.GettingUp:connect(function(state) onState(state, sGettingUp) end)
  357.     Humanoid.FreeFalling:connect(function(state) onState(state, sFreeFalling) end)
  358.     Humanoid.FallingDown:connect(function(state) onState(state, sFallingDown) end)
  359. --end)
  360. --Delay(0, function() --Vanilla Health
  361.     function waitForChild(parent, childName)
  362.         local child = parent:findFirstChild(childName)
  363.         if child then return child end
  364.         spawn(function()
  365.             while true do
  366.                 child = parent.ChildAdded:wait()
  367.                 if child.Name==childName then return child end
  368.             end
  369.         end)
  370.     end
  371.     local Figure = char
  372.     local Humanoid = waitForChild(Figure, "Humanoid")
  373.     local regening = false
  374.     function regenHealth()
  375.         if regening then return end
  376.         regening = true
  377.         spawn(function()
  378.             while Humanoid.Health < Humanoid.MaxHealth do
  379.                 local s = wait(1)
  380.                 local health = Humanoid.Health
  381.                 if health > 0 and health < Humanoid.MaxHealth then
  382.                     local newHealthDelta = 0.01 * s * Humanoid.MaxHealth
  383.                     health = health + newHealthDelta
  384.                     Humanoid.Health = math.min(health,Humanoid.MaxHealth)
  385.                 end
  386.             end
  387.         end)
  388.         if Humanoid.Health > Humanoid.MaxHealth then
  389.             Humanoid.Health = Humanoid.MaxHealth
  390.         end
  391.         regening = false
  392.     end
  393.     Humanoid.HealthChanged:connect(regenHealth)
  394. --end)
  395. --Delay(0, function() --Vanilla Animate, Multiple Additions
  396.     function waitForChild(parent, childName)
  397.         local child = parent:findFirstChild(childName)
  398.         if child then return child end
  399.         spawn(function()
  400.             while true do
  401.                 child = parent.ChildAdded:wait()
  402.                 if child.Name==childName then return child end
  403.             end
  404.         end)
  405.     end
  406.     local Figure = char
  407.     local Clone = Figure:Clone()
  408.     local Torso = waitForChild(Figure, "Torso")
  409.     local Joints = Torso:GetChildren()
  410.     for All = 1, #Joints do
  411.         if Joints.className == "Motor" or Joints.className == "Motor6D" then
  412.             Joints[All]:Remove()
  413.         end
  414.     end
  415.     local RightShoulder = Instance.new("Motor")
  416.     local LeftShoulder = Instance.new("Motor")
  417.     local RightHip = Instance.new("Motor")
  418.     local LeftHip = Instance.new("Motor")
  419.     local Neck = Instance.new("Motor")
  420.     local Humanoid = waitForChild(Figure, "Humanoid")
  421.     ZStat = 1
  422.     ZStat2 = 0
  423.     local pose = "Standing"
  424.     RightShoulder.Part0 = Torso
  425.     RightShoulder.Part1 = Figure["Right Arm"]
  426.     RightShoulder.MaxVelocity = 0.15
  427.     RightShoulder.Name = "Right Shoulder"
  428.     RightShoulder.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  429.     RightShoulder.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  430.     RightShoulder.Parent = Torso
  431.     LeftShoulder.Part0 = Torso
  432.     LeftShoulder.Part1 = Figure["Left Arm"]
  433.     LeftShoulder.MaxVelocity = 0.15
  434.     LeftShoulder.Name = "Left Shoulder"
  435.     LeftShoulder.C0 = CFrame.new(-1, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  436.     LeftShoulder.C1 = CFrame.new(0.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  437.     LeftShoulder.Parent = Torso
  438.     RightHip.Part0 = Torso
  439.     RightHip.Part1 = Figure["Right Leg"]
  440.     RightHip.MaxVelocity = 0.1
  441.     RightHip.Name = "Right Hip"
  442.     RightHip.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  443.     RightHip.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  444.     RightHip.Parent = Torso
  445.     LeftHip.Part0 = Torso
  446.     LeftHip.Part1 = Figure["Left Leg"]
  447.     LeftHip.MaxVelocity = 0.1
  448.     LeftHip.Name = "Left Hip"
  449.     LeftHip.C0 = CFrame.new(-1, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  450.     LeftHip.C1 = CFrame.new(-0.5, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  451.     LeftHip.Parent = Torso
  452.     Neck.Part0 = Torso
  453.     Neck.Part1 = Figure["Head"]
  454.     Neck.MaxVelocity = 0.1
  455.     Neck.Name = "Neck"
  456.     Neck.C0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  457.     Neck.C1 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  458.     Neck.Parent = Torso
  459.     local toolAnim = "None"
  460.     local toolAnimTime = 0
  461.     SpawnModel = Instance.new("Model")
  462.     function onRunning(speed)
  463.         if speed>0 then
  464.             pose = "Running"
  465.         else
  466.             pose = "Standing"
  467.         end
  468.     end
  469.     function CheckTag(Tag)
  470.         if char:FindFirstChild("IsLocalEnemy") == nil and char:FindFirstChild("IsAZombie") == nil and Tag.ClassName == "ObjectValue" and Tag.Value ~= nil and Tag.Value.ClassName == "Player" and Tag.Value.Character ~= nil then
  471.             if Tag.Value.Character:FindFirstChild("IsLocalEnemy") == nil then
  472.                 if (char.IsOnTeam.Value == true and IsInCombat == false and char.IsOnTeam.Team.Value == Tag.Value.TeamColor) or char.IsOnTeam.Value == false then
  473.                     local Tag2 = Instance.new("CFrameValue", Tag.Value.Character)
  474.                     Tag2.Name = "IsLocalEnemy"
  475.                     --print(Tag.Value.Character.Name .." Has Become An Outlaw")
  476.                 end
  477.             end
  478.             if Tag.Value.Character:FindFirstChild("Loc" ..char.Name) ~= nil then
  479.                 Tag.Value.Character:FindFirstChild("Loc" ..char.Name):Remove()
  480.             end
  481.             local Found = Instance.new("CFrameValue", Tag.Value.Character)
  482.             Found.Name = "Loc" ..char.Name
  483.             game:GetService("Debris"):AddItem(Found, 3)
  484.         elseif char:FindFirstChild("IsLocalEnemy") == nil and char:FindFirstChild("IsAZombie") == nil and Tag.ClassName == "StringValue" and game.Players:FindFirstChild(Tag.Value) ~= nil and game.Players[Tag.Value].Character ~= nil then
  485.             if game.Players[Tag.Value].Character:FindFirstChild("IsLocalEnemy") == nil then
  486.                 if (char.IsOnTeam.Value == true and IsInCombat == false and char.IsOnTeam.Team.Value == game.Players[Tag.Value].TeamColor) or char.IsOnTeam.Value == false then
  487.                     local Tag2 = Instance.new("CFrameValue", game.Players[Tag.Value].Character)
  488.                     Tag2.Name = "IsLocalEnemy"
  489.                     --print(Tag.Value .." Has Become An Outlaw")
  490.                 end
  491.             end
  492.             if game.Players[Tag.Value].Character:FindFirstChild("Loc" ..char.Name) ~= nil then
  493.                 game.Players[Tag.Value].Character:FindFirstChild("Loc" ..char.Name):Remove()
  494.             end
  495.             local Found = Instance.new("CFrameValue", game.Players[Tag.Value].Character)
  496.             Found.Name = "Loc" ..char.Name
  497.             game:GetService("Debris"):AddItem(Found, 3)
  498.         elseif char:FindFirstChild("IsLocalEnemy") == nil and char:FindFirstChild("IsAZombie") == nil and Tag.ClassName == "StringValue" and workspace:FindFirstChild(Tag.Value) ~= nil then
  499.             if workspace[Tag.Value]:FindFirstChild("IsLocalEnemy") == nil then
  500.                 if (char.IsOnTeam.Value == true and IsInCombat == false and workspace[Tag.Value].IsOnTeam.Value == true and char.IsOnTeam.Team.Value == workspace[Tag.Value].IsOnTeam.Team.Value) or char.IsOnTeam.Value == false or workspace[Tag.Value].IsOnTeam.Value == false then
  501.                     local Tag2 = Instance.new("CFrameValue", workspace[Tag.Value])
  502.                     Tag2.Name = "IsLocalEnemy"
  503.                     --print(Tag.Value .." Has Become An Outlaw")
  504.                 end
  505.             end
  506.             if workspace[Tag.Value]:FindFirstChild("Loc" ..char.Name) ~= nil then
  507.                 workspace[Tag.Value]:FindFirstChild("Loc" ..char.Name):Remove()
  508.             end
  509.             local Found = Instance.new("CFrameValue", workspace[Tag.Value])
  510.             Found.Name = "Loc" ..char.Name
  511.             game:GetService("Debris"):AddItem(Found, 3)
  512.         elseif (char:FindFirstChild("IsLocalEnemy") ~= nil or char:FindFirstChild("IsAZombie") ~= nil) and Tag.ClassName == "ObjectValue" and Tag.Value ~= nil and Tag.Value.ClassName == "Player" and Tag.Value.Character ~= nil then
  513.             local Found = Instance.new("CFrameValue", Tag.Value.Character)
  514.             Found.Name = "Loc" ..char.Name
  515.             game:GetService("Debris"):AddItem(Found, 3)
  516.         elseif (char:FindFirstChild("IsLocalEnemy") ~= nil or char:FindFirstChild("IsAZombie") ~= nil) and Tag.ClassName == "StringValue" and workspace:FindFirstChild(Tag.Value) ~= nil then
  517.             local Found = Instance.new("CFrameValue", workspace[Tag.Value])
  518.             Found.Name = "Loc" ..char.Name
  519.             game:GetService("Debris"):AddItem(Found, 3)
  520.         end
  521.     end
  522.     function CheckSpawns(Object)
  523.         local Parts = Object:GetChildren()
  524.         for Check = 1, #Parts do
  525.             if Parts[Check].className == "SpawnLocation" then
  526.                 local I = Instance.new("Vector3Value", SpawnModel)
  527.                 I.Value = Parts[Check].Position
  528.             end
  529.             CheckSpawns(Parts[Check])
  530.         end
  531.     end
  532.     function onDied()
  533.         pose = "Dead"
  534.         --[[
  535.         wait(5)
  536.             if char.Respawn.Value == true then
  537.                 CheckSpawns(Workspace)
  538.                 local Spawn = SpawnModel:GetChildren()
  539.                 Clone.Parent = workspace
  540.                 if #Spawn > 0 then
  541.                     Spawn = Spawn[math.random(1, #Spawn)].Value
  542.                     Clone:MoveTo(Spawn)
  543.                 else
  544.                     Clone:MoveTo(Vector3.new(0, 50, 0))
  545.                 end
  546.             end
  547.             Figure:Remove()
  548.             return
  549.         ]]
  550.     end
  551.     function onJumping()
  552.         pose = "Jumping"
  553.     end
  554.     function onClimbing()
  555.         pose = "Climbing"
  556.     end
  557.     function onGettingUp()
  558.         pose = "GettingUp"
  559.     end
  560.     function onFreeFall()
  561.         pose = "FreeFall"
  562.     end
  563.     function onFallingDown()
  564.         pose = "FallingDown"
  565.     end
  566.     function onSeated()
  567.         pose = "Seated"
  568.     end
  569.     function onPlatformStanding()
  570.         pose = "PlatformStanding"
  571.     end
  572.     function moveJump()
  573.         RightShoulder.MaxVelocity = 0.5
  574.         LeftShoulder.MaxVelocity = 0.5
  575.         RightShoulder.DesiredAngle = (3.14/ZStat)
  576.         LeftShoulder.DesiredAngle = (-3.14/ZStat)
  577.         RightHip.DesiredAngle = (0)
  578.         LeftHip.DesiredAngle = (0)
  579.     end
  580.     function moveFreeFall()
  581.         RightShoulder.MaxVelocity = 0.5
  582.         LeftShoulder.MaxVelocity = 0.5
  583.         RightShoulder.DesiredAngle = (3.14/ZStat)
  584.         LeftShoulder.DesiredAngle = (-3.14/ZStat)
  585.         RightHip.DesiredAngle = (0)
  586.         LeftHip.DesiredAngle = (0)
  587.     end
  588.     function moveSit()
  589.         RightShoulder.MaxVelocity = 0.15
  590.         LeftShoulder.MaxVelocity = 0.15
  591.         RightShoulder.DesiredAngle = (3.14 /2)
  592.         LeftShoulder.DesiredAngle = (-3.14 /2)
  593.         RightHip.DesiredAngle = (3.14 /2)
  594.         LeftHip.DesiredAngle = (-3.14 /2)
  595.     end
  596.     function getTool() 
  597.         for _, kid in ipairs(Figure:GetChildren()) do
  598.             if kid.className == "Tool" then return kid end
  599.         end
  600.         return nil
  601.     end
  602.     function getToolAnim(tool)
  603.         for _, c in ipairs(tool:GetChildren()) do
  604.             if c.Name == "toolanim" and c.className == "StringValue" then
  605.                 return c
  606.             end
  607.         end
  608.         return nil
  609.     end
  610.     function animateTool()
  611.         if (toolAnim == "None") then
  612.             RightShoulder.DesiredAngle = (1.57)
  613.             return
  614.         end
  615.         if (toolAnim == "Slash") then
  616.             RightShoulder.MaxVelocity = 0.5
  617.             RightShoulder.DesiredAngle = (0)
  618.             return
  619.         end
  620.         if (toolAnim == "Lunge") then
  621.             RightShoulder.MaxVelocity = 0.5
  622.             LeftShoulder.MaxVelocity = 0.5
  623.             RightHip.MaxVelocity = 0.5
  624.             LeftHip.MaxVelocity = 0.5
  625.             RightShoulder.DesiredAngle = (1.57)
  626.             LeftShoulder.DesiredAngle = (1.0)
  627.             RightHip.DesiredAngle = (1.57)
  628.             LeftHip.DesiredAngle = (1.0)
  629.             return
  630.         end
  631.     end
  632.     function move(time)
  633.         local amplitude
  634.         local frequency
  635.         if (pose == "Jumping") then
  636.             moveJump()
  637.             return
  638.         end
  639.         if (pose == "FreeFall") then
  640.             moveFreeFall()
  641.             return
  642.         end  
  643.         if (pose == "Seated") then
  644.             moveSit()
  645.             return
  646.         end
  647.         local climbFudge = 0
  648.         if (pose == "Running") then
  649.             RightShoulder.MaxVelocity = 0.15
  650.             LeftShoulder.MaxVelocity = 0.15
  651.             amplitude = 1
  652.             frequency = 9
  653.         elseif (pose == "Climbing") then
  654.             RightShoulder.MaxVelocity = 0.5
  655.             LeftShoulder.MaxVelocity = 0.5
  656.             amplitude = 1
  657.             frequency = 9
  658.             climbFudge = 3.14
  659.         else
  660.             amplitude = 0.1
  661.             frequency = 1
  662.         end
  663.         desiredAngle = amplitude * math.sin(time*frequency)
  664.         RightShoulder.DesiredAngle = (desiredAngle + climbFudge) + ZStat2
  665.         LeftShoulder.DesiredAngle = (desiredAngle - climbFudge) -ZStat2
  666.         RightHip.DesiredAngle = (-desiredAngle)
  667.         LeftHip.DesiredAngle = (-desiredAngle)
  668.         local tool = getTool()
  669.         if tool then
  670.             animStringValueObject = getToolAnim(tool)
  671.             if animStringValueObject then
  672.                 toolAnim = animStringValueObject.Value
  673.                 animStringValueObject.Parent = nil
  674.                 toolAnimTime = time + .3
  675.             end
  676.             if time > toolAnimTime then
  677.                 toolAnimTime = 0
  678.                 toolAnim = "None"
  679.             end
  680.             animateTool()
  681.         else
  682.             toolAnim = "None"
  683.             toolAnimTime = 0
  684.         end
  685.     end
  686.     Humanoid.Died:connect(onDied)
  687.     Humanoid.Running:connect(onRunning)
  688.     Humanoid.Jumping:connect(onJumping)
  689.     Humanoid.Climbing:connect(onClimbing)
  690.     Humanoid.GettingUp:connect(onGettingUp)
  691.     Humanoid.FreeFalling:connect(onFreeFall)
  692.     Humanoid.FallingDown:connect(onFallingDown)
  693.     Humanoid.Seated:connect(onSeated)
  694.     Humanoid.PlatformStanding:connect(onPlatformStanding)
  695.     Humanoid.ChildAdded:connect(CheckTag)
  696.     OriginalTime = 0.1
  697.     Time = OriginalTime
  698.     spawn(function()
  699.         while Figure.Parent~=nil do
  700.             Time = Time + 0.1
  701.             wait(OriginalTime)
  702.             move(Time)
  703.         end
  704.     end)
  705. --end)
  706. --[[
  707. spawn(function()
  708. while char and char.Parent and torso and torso.Parent do
  709.     wait(math.random(40, 70 + math.random(30, 120)) / 10)
  710.     local Weapon = nil
  711.     local ToolCheck = char:GetChildren()
  712.     for Check = 1, #ToolCheck do
  713.         if ToolCheck[Check].ClassName == "Tool" then
  714.             Weapon = ToolCheck[Check]
  715.         end
  716.     end
  717.     if Weapon ~= nil and Weapon:FindFirstChild("Active") ~= nil and Weapon:FindFirstChild("TargetPos") ~= nil and Weapon:FindFirstChild("Type") ~= nil then
  718.         if Weapon.Type.Value == "HealDrink" then
  719.             Weapon.Active.Value = true
  720.         end
  721.     end
  722. end
  723. end)
  724. ]]
  725. --end)
  726. end
  727.  
  728. function set_owner()
  729.     if char then else return end
  730.     for i,v in pairs(char:GetChildren()) do
  731.         if v:IsA("BasePart") and v:CanSetNetworkOwnership() then
  732.             v:SetNetworkOwner(plr)
  733.         end
  734.     end
  735. end
  736.  
  737. local oldpos = CFrame.new()
  738. local rebirthing = false
  739. local updating_inv = false
  740. local connection = nil
  741. local barrier = nil
  742.  
  743. if torso then
  744.     oldpos = torso.CFrame
  745. end
  746.  
  747. local remote = Instance.new("RemoteEvent")
  748. remote.Parent = plr['PlayerGui']
  749.  
  750. remote.OnServerEvent:Connect(function(lplr,pos)
  751.     if not rebirthing and (plr == lplr) then
  752.         --oldpos = pos
  753.     end
  754. end)
  755.  
  756. local ls = [[
  757.     local plr = game:GetService("Players").LocalPlayer
  758.     local char = nil
  759.     local torso = nil
  760.     local hum = nil
  761.     local remote = script.Parent
  762.     local camera = workspace.CurrentCamera
  763.     camera.CameraType = Enum.CameraType.Custom
  764.     game:GetService("RunService").Heartbeat:Connect(function()
  765.         spawn(function()
  766.             if not char or not char.Parent or not torso or not torso.Parent or not hum or not hum.Parent then
  767.                 repeat wait() until plr.Character
  768.                 char = plr.Character
  769.                 torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart")
  770.                 hum = char:FindFirstChildOfClass("Humanoid")
  771.             end
  772.             if torso and torso.Parent then
  773.                 --remote:FireServer(torso.CFrame)
  774.             end
  775.             if char and char.Parent and hum and hum.Parent then
  776.                 camera.CameraSubject = hum
  777.             end
  778.         end)
  779.     end)
  780. ]]
  781.  
  782. NLS(ls,remote)
  783.  
  784. local pdata = {
  785.     ws = 16,
  786.     hh = 0,
  787.     msa = 89,
  788.     jp = 50,
  789.     sit = false,
  790.     platformstand = false,
  791.     autorotate = true,
  792.     usejumppower = true,
  793.     autojump = true,
  794.     --breakjoints = false
  795.     --jump = false,
  796. }
  797.  
  798. function update_pdata(...)
  799.     local data = ...
  800.     pdata = data
  801. end
  802.  
  803. function update_inv()
  804.     if not updating_inv then else return end
  805.     updating_inv = true
  806.     for i,v in pairs(saved_tools:GetChildren()) do v:Destroy(); end;
  807.     for i,v in pairs(plr['Backpack']:GetChildren()) do
  808.         v:Clone().Parent = saved_tools
  809.     end
  810.     for i,v in pairs(char:GetChildren()) do
  811.         v:Clone().Parent = saved_tools
  812.     end
  813.     updating_inv = false
  814. end
  815.  
  816. function load_inv()
  817.     spawn(function()
  818.         for i,v in pairs(saved_tools:GetChildren()) do
  819.             v:Clone().Parent = plr['Backpack']
  820.         end
  821.     end)
  822. end
  823.  
  824. function smart_add(p)
  825.     spawn(function()
  826.         for i,v in pairs(p:GetChildren()) do
  827.             v.ChildAdded:Connect(function(obj)
  828.                 if obj:IsA('Script') or obj:IsA('LocalScript') or obj:IsA('BodyForce') or obj:IsA('BodyGyro') or obj:IsA('BodyAngularVelocity') or obj:IsA('BodyPosition') or obj:IsA('BodyMover') or obj:IsA('BodyVelocity') or obj:IsA('BodyThrust') then
  829.                     obj:Destroy()
  830.                 end
  831.             end)
  832.         end
  833.     end)
  834. end
  835.  
  836. function load_pdata(char,torso,hum)
  837.     pcall(function()
  838.         hum.WalkSpeed = pdata.ws or 16;
  839.         hum.HipHeight = pdata.hh or 0;
  840.         hum.MaxSlopeAngle = pdata.msa or 89;
  841.         hum.JumpPower = pdata.jp or 50;
  842.         hum.Sit = pdata.sit or false;
  843.         hum.PlatformStand = pdata.platformstand or false;
  844.         hum.AutoRotate = pdata.autorotate or true;
  845.         hum.UseJumpPower = pdata.usejumppower or true;
  846.         hum.AutoJumpEnabled = pdata.autojump or true;
  847.         hum.BreakJointsOnDeath = false;
  848.         hum:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false);
  849.         hum:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false);
  850.         hum.MaxHealth = 1/0
  851.         hum.Health = 1/0
  852.         torso.Velocity = Vector3.new()
  853.         torso.CFrame = oldpos
  854.         local ff = char:FindFirstChildOfClass("ForceField")
  855.         if ff then
  856.             ff:Destroy()
  857.         end
  858.         local ff = Instance.new("ForceField")
  859.         ff.Visible = false
  860.         ff.Parent = char
  861.         smart_add(char)
  862.         make_barrier(torso,char,workspace)
  863.     end)
  864. end
  865.  
  866. function make_barrier(root,char,p)
  867.     spawn(function()
  868.         barrier = Instance.new("Part")
  869.         barrier.Name = game:GetService("HttpService"):GenerateGUID(false) or ''
  870.         barrier.Transparency = 1
  871.         barrier.Size = Vector3.new(10,10,10)
  872.         barrier.CanCollide = false
  873.         barrier.Massless = true
  874.         barrier.Locked = true
  875.         barrier.Archivable = false
  876.         barrier.Parent = p
  877.         local weld = Instance.new("Weld")
  878.         weld.Part0 = root
  879.         weld.Part1 = barrier
  880.         weld.Parent = barrier
  881.         barrier.Touched:Connect(function(obj)
  882.             local n = string.lower(obj.Name)
  883.             --local found = false
  884.             if (n and (n == 'base' or n == 'baseplate')) or (char and obj:IsDescendantOf(char)) or not obj:FindFirstChildOfClass('TouchInterest') then
  885.                 --found = true
  886.             else
  887.                 obj = nil;
  888.             end
  889.         end)
  890.         connection = p.ChildRemoved:Connect(function(obj)
  891.             if obj == barrier or obj == weld then
  892.                 if obj then obj:Destroy(); end; if connection then connection:Disconnect(); end;
  893.                 make_barrier(root,char,p)
  894.             end
  895.         end)
  896.         barrier.ChildRemoved:Connect(function(obj)
  897.             if obj == weld then
  898.                 if connection then connection:Disconnect(); end; if barrier then barrier:Destroy(); end;
  899.                 make_barrier(root,char,p)
  900.             end
  901.         end)
  902.     end)
  903. end
  904.  
  905. function rebirth()
  906.     rebirthing = true
  907.     make_char()
  908.     --load_inv()
  909.     load_pdata(char,torso,hum)
  910.     rebirthing = false
  911.     setup()
  912. end
  913.  
  914. function setup()
  915.     local died = false
  916.        
  917.     local function alive()
  918.         local alive = false
  919.         if char and char.Parent and (char.Parent == workspace) and torso and torso.Parent and hum and hum.Parent and hum.Health > 0 then
  920.             alive = true
  921.         end
  922.         return alive
  923.     end
  924.    
  925.     --spawn(function()
  926.         while not died do
  927.             if not alive() then
  928.                 died = true
  929.             end
  930.             if not alive() and not rebirthing then
  931.                 rebirth()
  932.             end
  933.             if alive() and not rebirthing and not died then
  934.                 local tdata = {
  935.                     --ws = hum.WalkSpeed,
  936.                     --hh = hum.HipHeight,
  937.                     --msa = hum.MaxSlopeAngle,
  938.                     --jp = hum.JumpPower,
  939.                     sit = hum.Sit,
  940.                     --platformstand = hum.PlatformStand,
  941.                     --autorotate = hum.AutoRotate,
  942.                     --usejumppower = hum.UseJumpPower,
  943.                     --autojump = hum.AutoJumpEnabled,
  944.                 }
  945.                 --update_inv()
  946.                 update_pdata(tdata)
  947.                 if char then
  948.                     --plr.Character = char
  949.                 end
  950.                 hum.MaxHealth = 1/0; hum.Health = 1/0;
  951.                 if 100 >= (torso.Position.Y-workspace.FallenPartsDestroyHeight) then
  952.                     barrier.Velocity = Vector3.new()
  953.                     barrier.Position = Vector3.new(math.random(1,100),5,math.random(1,100))
  954.                 end
  955.                 oldpos = torso.CFrame
  956.             end
  957.             game:GetService("RunService").Heartbeat:Wait(1/30)
  958.         end
  959.     --end)
  960. end
  961.  
  962. rebirth()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement