DarkScripter123

Blood Script

Mar 14th, 2017
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 38.88 KB | None | 0 0
  1. script.Parent = nil
  2. script.Name = "RobloxAdvanced"
  3. if _G.RobloxAdvanced ~= nil then
  4. pcall(function() _G.RobloxAdvanced.Disable() end)
  5. wait(0.5)
  6. _G.RobloxAdvanced = nil
  7. wait(0.5)
  8. end
  9. _G.RobloxAdvanced = {}
  10. _G.RobloxAdvanced.Instance = script
  11. _G.RobloxAdvanced.Connections = {}
  12. _G.RobloxAdvanced.RagdollOnHit = true
  13. _G.RobloxAdvanced.DamageOnHit = true
  14. _G.RobloxAdvanced.CriticalHitsEnabled = true
  15. _G.RobloxAdvanced.RagdollOnDeath = true
  16. _G.RobloxAdvanced.KeepCorpses = true
  17. _G.RobloxAdvanced.KeepCorpsesTime = 20
  18. _G.RobloxAdvanced.ShowDamage = true
  19. _G.RobloxAdvanced.BloodEnabled = true
  20. _G.RobloxAdvanced.BloodGuiEnabled = true
  21. _G.RobloxAdvanced.DeathGuiEnabled = true
  22. _G.RobloxAdvanced.SpawnGuiEnabled = true
  23. _G.RobloxAdvanced.HUDEnabled = true
  24. _G.RobloxAdvanced.HUDTimeReset = function() _G.RobloxAdvanced.HUDTimeOffset = tick() end
  25. _G.RobloxAdvanced.HUDTimeReset()
  26. _G.RobloxAdvanced.HUDRemove = function()
  27. for _, PlayerList in pairs(game:GetService("Players"):GetChildren()) do
  28. pcall(function() while true do PlayerList.PlayerGui.RobloxAdvancedHUD:Remove() end end)
  29. end
  30. end
  31. _G.RobloxAdvanced.HUDShow = function()
  32. _G.RobloxAdvanced.HUDRemove()
  33. for _, PlayerList in pairs(game:GetService("Players"):GetChildren()) do
  34. _G.RobloxAdvanced.HUD(PlayerList)
  35. end
  36. end
  37. _G.RobloxAdvanced.Disable = function()
  38. _G.RobloxAdvanced.RagdollOnHit = false
  39. _G.RobloxAdvanced.DamageOnHit = false
  40. _G.RobloxAdvanced.CriticalHitsEnabled = false
  41. _G.RobloxAdvanced.RagdollOnDeath = false
  42. _G.RobloxAdvanced.KeepCorpses = false
  43. _G.RobloxAdvanced.ShowDamage = false
  44. _G.RobloxAdvanced.BloodEnabled = false
  45. _G.RobloxAdvanced.BloodGuiEnabled = false
  46. _G.RobloxAdvanced.DeathGuiEnabled = false
  47. _G.RobloxAdvanced.SpawnGuiEnabled = false
  48. _G.RobloxAdvanced.HUDEnabled = false
  49. _G.RobloxAdvanced.HUDRemove()
  50. pcall(function() _G.RobloxAdvanced.Instance.Disabled = true end)
  51. for _, Connection in pairs(_G.RobloxAdvanced.Connections) do
  52. pcall(function() Connection:disconnect() end)
  53. end
  54. end
  55. _G.RobloxAdvanced.MakeBlood = function()
  56. local Size = math.random(10, 75) / 100
  57. local Blood = Instance.new("Part")
  58. Blood.Name = "Blood"
  59. Blood.BrickColor = BrickColor.new("Really red")
  60. Blood.TopSurface = 0
  61. Blood.BottomSurface = 0
  62. Blood.FormFactor = "Custom"
  63. Blood.Size = Vector3.new(Size, Size, Size)
  64. Blood.CanCollide = false
  65. Instance.new("SpecialMesh", Blood).MeshType = "Sphere"
  66. local HasTouched = true
  67. coroutine.wrap(function()
  68. wait(0.09)
  69. HasTouched = false
  70. end)()
  71. table.insert(_G.RobloxAdvanced.Connections, Blood.Touched:connect(function(Hit)
  72. if Hit.Name ~= "Blood" and Hit.Name ~= "Blood Pool" then
  73. if Hit:GetMass() < 100 and math.random(1, 30) == 1 then
  74. Hit.BrickColor = BrickColor.new((function()
  75. local Color = math.random(1, 2)
  76. if Color == 1 then
  77. return "Bright red"
  78. elseif Color == 2 then
  79. return "Really red"
  80. end
  81. end)())
  82. end
  83. end
  84. if Blood.Name == "Blood" and Hit.Name == "Blood Pool" then
  85. Blood:Remove()
  86. elseif Blood.Name == "Blood Pool" and Hit.Name == "Blood" then
  87. if Blood.Size.x > math.random(5, 20) or Blood.Size.z > math.random(5, 20) then return end
  88. local _, C0, C1, Part1 = pcall(function() return Blood.Weld.C0, Blood.Weld.C1, Blood.Weld.Part1 end)
  89. Blood.Size = Blood.Size + Vector3.new(Hit.Size.x / 5, 0, Hit.Size.z / 5)
  90. Blood.CFrame = Part1.CFrame * C0 * C1
  91. if C0 ~= nil and C1 ~= nil and Part1 ~= nil then
  92. local Weld = Instance.new("Weld", Blood)
  93. Weld.Part0 = Blood
  94. Weld.Part1 = Part1
  95. Weld.C0 = C0
  96. Weld.C1 = C1
  97. end
  98. elseif HasTouched == false and Hit.Name ~= "Blood" then
  99. HasTouched = true
  100. local NewHit, Position = Workspace:FindPartOnRay(Ray.new(Blood.Position + Vector3.new(0, 1, 0), Vector3.new(0, -3, 0)), Blood)
  101. if NewHit ~= nil and NewHit.Anchored == true then
  102. Blood.Size = Vector3.new(Size * 2, 0.3, Size * 2)
  103. Blood.Name = "Blood Pool"
  104. Blood.CFrame = CFrame.new(Position)
  105. local Weld = Instance.new("Weld", Blood)
  106. Weld.Part0 = Blood
  107. Weld.Part1 = NewHit
  108. Weld.C0 = Blood.CFrame:inverse() * CFrame.new(Position)
  109. Weld.C1 = NewHit.CFrame:inverse() * CFrame.new(Position)
  110. else
  111. local Weld = Instance.new("Weld", Blood)
  112. Weld.Part0 = Blood
  113. Weld.Part1 = Hit
  114. Weld.C0 = Blood.CFrame:inverse() * CFrame.new(Blood.Position)
  115. Weld.C1 = Hit.CFrame:inverse() * CFrame.new(Blood.Position)
  116. end
  117. end
  118. end))
  119. coroutine.wrap(function()
  120. local Size = Blood.Size
  121. local Step = math.random(40, 100) / 1000
  122. while Blood.Transparency < 1 do
  123. if Blood.Name == "Blood Pool" and Size ~= Blood.Size then
  124. Step = 0.003
  125. Size = Blood.Size
  126. Blood.Transparency = 0
  127. end
  128. Blood.Transparency = Blood.Transparency + Step
  129. wait()
  130. end
  131. Blood:Remove()
  132. end)()
  133. return Blood
  134. end
  135. _G.RobloxAdvanced.HUD = function(Player)
  136. if _G.RobloxAdvanced.HUDEnabled == false then return end
  137. local PlayerGui = Player:FindFirstChild("PlayerGui")
  138. if PlayerGui == nil then return end
  139. coroutine.wrap(function()
  140. while _G.RobloxAdvanced.HUDEnabled == true do
  141. pcall(function()
  142. PlayerGui.HealthGUI:Remove()
  143. end)
  144. wait()
  145. end
  146. end)()
  147. local Gui = Instance.new("ScreenGui")
  148. Gui.Name = "RobloxAdvancedHUD"
  149. local Frame = Instance.new("Frame")
  150. Frame.Name = "Background"
  151. Frame.Size = UDim2.new(0, 500, 0, 15)
  152. Frame.Position = UDim2.new(0.5, (-500 / 2), 1, -15)
  153. Frame.BackgroundTransparency = 1
  154. Frame.BorderSizePixel = 0
  155. Frame.Parent = Gui
  156. local Kills = Instance.new("TextLabel")
  157. Kills.Name = "Kills"
  158. Kills.Size = UDim2.new(1 / 5, 0, 1, 0)
  159. Kills.Position = UDim2.new(0, 0, 0, 0)
  160. Kills.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
  161. Kills.BorderSizePixel = 1
  162. Kills.BorderColor3 = Color3.new(1, 1, 1)
  163. Kills.TextColor3 = Color3.new(1, 1, 1)
  164. Kills.Parent = Frame
  165. coroutine.wrap(function()
  166. while true do
  167. Kills.Text = "Kills: " ..(Player:FindFirstChild("RobloxAdvancedKills") ~= nil and Player.RobloxAdvancedKills.Value or 0)
  168. wait(0.5)
  169. end
  170. end)()
  171. Frame.Parent = Gui
  172. local Killstreak = Instance.new("TextLabel")
  173. Killstreak.Name = "Killstreak"
  174. Killstreak.Size = UDim2.new(1 / 5, 0, 1, 0)
  175. Killstreak.Position = UDim2.new(1 / 5, 0, 0, 0)
  176. Killstreak.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
  177. Killstreak.BorderSizePixel = 1
  178. Killstreak.BorderColor3 = Color3.new(1, 1, 1)
  179. Killstreak.TextColor3 = Color3.new(1, 1, 1)
  180. Killstreak.Parent = Frame
  181. coroutine.wrap(function()
  182. while true do
  183. Killstreak.Text = "Streak: " ..(Player:FindFirstChild("RobloxAdvancedKillstreak") ~= nil and Player.RobloxAdvancedKillstreak.Value or 0)
  184. wait(0.5)
  185. end
  186. end)()
  187. local Deaths = Instance.new("TextLabel")
  188. Deaths.Name = "Deaths"
  189. Deaths.Size = UDim2.new(1 / 5, 0, 1, 0)
  190. Deaths.Position = UDim2.new(1 / 5 * 2, 0, 0, 0)
  191. Deaths.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
  192. Deaths.BorderSizePixel = 1
  193. Deaths.BorderColor3 = Color3.new(1, 1, 1)
  194. Deaths.TextColor3 = Color3.new(1, 1, 1)
  195. Deaths.Parent = Frame
  196. coroutine.wrap(function()
  197. while true do
  198. Deaths.Text = "Deaths: " ..(Player:FindFirstChild("RobloxAdvancedDeaths") ~= nil and Player.RobloxAdvancedDeaths.Value or 0)
  199. wait(0.5)
  200. end
  201. end)()
  202. local Health = Instance.new("TextLabel")
  203. Health.Name = "Health"
  204. Health.Size = UDim2.new(1 / 5, 0, 1, 0)
  205. Health.Position = UDim2.new(1 / 5 * 3, 0, 0, 0)
  206. Health.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
  207. Health.BorderSizePixel = 1
  208. Health.BorderColor3 = Color3.new(1, 1, 1)
  209. Health.TextColor3 = Color3.new(1, 1, 1)
  210. Health.Parent = Frame
  211. coroutine.wrap(function()
  212. for i = 0, math.huge, 0.5 do
  213. if pcall(function() local _ = Player.Character.Humanoid end) == true then
  214. if Player.Character.Humanoid.Health == math.huge or Player.Character.Humanoid.MaxHealth == math.huge then
  215. Health.Text = "Invincible"
  216. Health.BackgroundColor3 = Color3.new(0, 0, 0.5)
  217. else
  218. Health.Text = "Health: " ..math.floor(Player.Character.Humanoid.Health).. "/" ..math.floor(Player.Character.Humanoid.MaxHealth)
  219. Health.BackgroundColor3 = Color3.new((1 - (Player.Character.Humanoid.Health / Player.Character.Humanoid.MaxHealth)) * 0.9, (Player.Character.Humanoid.Health / Player.Character.Humanoid.MaxHealth) * 0.5, 0)
  220. end
  221. if Player.Character:FindFirstChild("ForceField") ~= nil then
  222. Health.BackgroundColor3 = Color3.new(((math.sin(i) + 1) / 2), 0, 1 - ((math.sin(i) + 1) / 2))
  223. end
  224. else
  225. Health.Text = "Health: Nil"
  226. Health.BackgroundColor3 = Color3.new(0, 0, 0)
  227. end
  228. wait(0.05)
  229. end
  230. end)()
  231. local Time = Instance.new("TextLabel")
  232. Time.Name = "Time"
  233. Time.Size = UDim2.new(1 / 5, 0, 1, 0)
  234. Time.Position = UDim2.new(1 / 5 * 4, 0, 0, 0)
  235. Time.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1)
  236. Time.BorderSizePixel = 1
  237. Time.BorderColor3 = Color3.new(1, 1, 1)
  238. Time.TextColor3 = Color3.new(1, 1, 1)
  239. Time.Parent = Frame
  240. coroutine.wrap(function()
  241. while true do
  242. local Total = tick() - _G.RobloxAdvanced.HUDTimeOffset
  243. local Minutes = math.floor(Total / 60)
  244. local Seconds = math.floor(Total % 60)
  245. if string.len(Minutes) == 1 then Minutes = "0" ..Minutes end
  246. if string.len(Seconds) == 1 then Seconds = "0" ..Seconds end
  247. Time.Text = "Time: " ..Minutes.. ":" ..Seconds
  248. wait(0.05)
  249. end
  250. end)()
  251. Gui.Parent = PlayerGui
  252. end
  253. _G.RobloxAdvanced.HookPlayerDeath = function(Player)
  254. table.insert(_G.RobloxAdvanced.Connections, Player.Changed:connect(function(Property)
  255. if Property == "Character" then
  256. if Player.Character ~= nil then
  257. if _G.RobloxAdvanced.SpawnGuiEnabled == true then
  258. local PlayerGui = Player:FindFirstChild("PlayerGui")
  259. if PlayerGui == nil then return end
  260. local Gui = Instance.new("ScreenGui")
  261. Gui.Name = "Life"
  262. local Frame = Instance.new("Frame")
  263. Frame.Name = "White"
  264. Frame.Size = UDim2.new(2, 0, 2, 0)
  265. Frame.Position = UDim2.new(-0.5, 0, -0.5, 0)
  266. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  267. Frame.BackgroundTransparency = 0
  268. Frame.Parent = Gui
  269. Gui.Parent = PlayerGui
  270. coroutine.wrap(function()
  271. wait(0.1)
  272. for i = 0, 1, 0.1 do
  273. Frame.BackgroundColor3 = Color3.new(i, i, i)
  274. wait()
  275. end
  276. Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  277. wait(0.3)
  278. for i = 0, 1, 0.05 do
  279. Frame.BackgroundTransparency = i
  280. wait()
  281. end
  282. Gui:Remove()
  283. end)()
  284. end
  285. _G.RobloxAdvanced.HUD(Player)
  286. end
  287. end
  288. end))
  289. _G.RobloxAdvanced.HUD(Player)
  290. table.insert(_G.RobloxAdvanced.Connections, Player.Chatted:connect(function(Message)
  291. if string.sub(Message, 0, 5) == "lego " then Message = string.sub(Message, 6) end
  292. Message = Message:lower()
  293. if Message == "throw me" or Message == "ragdoll" then
  294. if Player.Character == nil then return end
  295. if Player.Character:FindFirstChild("Humanoid") == nil then return end
  296. if Player.Character:FindFirstChild("Torso") == nil then return end
  297. Player.Character.Humanoid.Sit = true
  298. _G.RobloxAdvanced.Ragdoll(true, Player.Character)
  299. if Message == "throw me" then
  300. Player.Character.Torso.Velocity = Player.Character.Torso.Velocity + (Player.Character.Torso.CFrame.lookVector * 150) + Vector3.new(0, 50, 0)
  301. end
  302. end
  303. end))
  304. end
  305. _G.RobloxAdvanced.HookModelDeath = function(Character)
  306. wait()
  307. if Character == nil then return end
  308. if Character:FindFirstChild("Humanoid") == nil then return end
  309. local RagdollStatus = false
  310. local ConnectTouched = function(Part)
  311. if Part.Parent ~= Character then return end
  312. pcall(function()
  313. table.insert(_G.RobloxAdvanced.Connections, Part.Touched:connect(function(Hit)
  314. if Hit == nil then return end
  315. if Hit.Parent == nil then return end
  316. if Hit.Parent ~= Character and Hit.Parent.Parent ~= Character and Hit:GetMass() > 3 then
  317. local Velocity1 = {
  318. math.abs(Part.Velocity.x),
  319. math.abs(Part.Velocity.y),
  320. math.abs(Part.Velocity.z)
  321. }
  322. local RotVelocity1 = {
  323. math.abs(Part.RotVelocity.x),
  324. math.abs(Part.RotVelocity.y),
  325. math.abs(Part.RotVelocity.z)
  326. }
  327. local Velocity2 = {
  328. math.abs(Hit.Velocity.x),
  329. math.abs(Hit.Velocity.y),
  330. math.abs(Hit.Velocity.z)
  331. }
  332. local RotVelocity2 = {
  333. math.abs(Hit.RotVelocity.x),
  334. math.abs(Hit.RotVelocity.y),
  335. math.abs(Hit.RotVelocity.z)
  336. }
  337. if RagdollStatus == false and _G.RobloxAdvanced.RagdollOnHit == true then
  338. for i = 1, 3 do
  339. local Total = math.abs(Velocity1[i] - Velocity2[i])
  340. if Total > math.random(85, 150) then
  341. RagdollStatus = true
  342. end
  343. end
  344. for i = 1, 3 do
  345. local Total = math.abs(RotVelocity1[i] - RotVelocity2[i])
  346. if Total > math.random(75, 100) then
  347. RagdollStatus = true
  348. end
  349. end
  350. if RagdollStatus == true then
  351. _G.RobloxAdvanced.Ragdoll(true, Character)
  352. if Character.Humanoid.PlatformStand == true or Character.Humanoid.Sit == true then
  353. coroutine.wrap(function()
  354. wait(5)
  355. RagdollStatus = false
  356. end)()
  357. else
  358. coroutine.wrap(function()
  359. Character.Humanoid.PlatformStand = true
  360. wait(1)
  361. Character.Humanoid.PlatformStand = false
  362. wait(5)
  363. RagdollStatus = false
  364. end)()
  365. end
  366. end
  367. end
  368. local Damage = 0
  369. for i = 1, #Velocity1 do Damage = Damage + Velocity1[i] end
  370. for i = 1, #RotVelocity1 do Damage = Damage + RotVelocity1[i] end
  371. for i = 1, #Velocity2 do Damage = Damage + Velocity2[i] end
  372. for i = 1, #RotVelocity2 do Damage = Damage + RotVelocity2[i] end
  373. Damage = Damage / 60
  374. if Damage >= 4 and _G.RobloxAdvanced.DamageOnHit == true then
  375. pcall(function() Character.Humanoid:TakeDamage(math.floor(Damage)) end)
  376. end
  377. end
  378. end))
  379. end)
  380. end
  381. for _, Part in pairs(Character:GetChildren()) do ConnectTouched(Part) end
  382. table.insert(_G.RobloxAdvanced.Connections, Character.ChildAdded:connect(function(Part) ConnectTouched(Part) end))
  383. local OldHealth = Character.Humanoid.Health
  384. table.insert(_G.RobloxAdvanced.Connections, Character.Humanoid.Changed:connect(function(Property)
  385. if Property == "Health" then
  386. local Source = nil
  387. for _, Part in pairs(Character:GetChildren()) do
  388. if Part:IsA("BasePart") then
  389. if Source == nil then
  390. Source = Part
  391. else
  392. if math.abs(Part.Velocity.x) + math.abs(Part.Velocity.y) + math.abs(Part.Velocity.z) > math.abs(Source.Velocity.x) + math.abs(Source.Velocity.y) + math.abs(Source.Velocity.z) then
  393. Source = Part
  394. end
  395. end
  396. end
  397. end
  398. if Source == nil then return end
  399. if math.abs(Character.Humanoid.Health - OldHealth) > math.abs((Character.Humanoid.Health + 0.01 * 1.05 * Character.Humanoid.MaxHealth) - Character.Humanoid.Health) and _G.RobloxAdvanced.ShowDamage == true then
  400. local Model = Instance.new("Model", Workspace)
  401. Model.Name = tostring(math.floor(Character.Humanoid.Health - OldHealth))
  402. Model.Name = Model.Name:sub(0, 1) ~= "-" and Model.Name.. "+" or Model.Name
  403. local Damage = Instance.new("Part", Model)
  404. Damage.Name = "Head"
  405. Damage.BrickColor = BrickColor.new(Model.Name:match("-") and "Really red" or "Lime green")
  406. if (OldHealth - Character.Humanoid.Health) / Character.Humanoid.MaxHealth > 0.25 then
  407. coroutine.wrap(function()
  408. while Damage.Parent ~= nil do
  409. Damage.BrickColor = BrickColor.new("New Yeller")
  410. wait()
  411. Damage.BrickColor = BrickColor.new("Really blue")
  412. wait()
  413. end
  414. end)()
  415. end
  416. Damage.TopSurface = 0
  417. Damage.BottomSurface = 0
  418. Damage.CanCollide = false
  419. Damage.FormFactor = "Custom"
  420. Damage.Size = (OldHealth - Character.Humanoid.Health) / Character.Humanoid.MaxHealth > 0.25 and Vector3.new(1, 1, 1) or Vector3.new(0.5, 0.5, 0.5)
  421. Damage.CFrame = CFrame.new(Source.Position)
  422. coroutine.wrap(function()
  423. while Damage.Parent ~= nil do
  424. Damage.CanCollide = false
  425. wait()
  426. end
  427. end)()
  428. local Humanoid = Instance.new("Humanoid", Model)
  429. Humanoid.Name = "Sign"
  430. Humanoid.MaxHealth = 0
  431. Humanoid.Health = 0
  432. Humanoid.WalkSpeed = 0
  433. Humanoid.PlatformStand = true
  434. local BodyVelocity = Instance.new("BodyVelocity", Damage)
  435. BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  436. BodyVelocity.velocity = Vector3.new(0, 7, 0)
  437. coroutine.wrap(function()
  438. wait(1)
  439. for i = 0, 1, 0.05 do
  440. Damage.Transparency = i
  441. BodyVelocity.velocity = Vector3.new(0, 7 * (1 - i), 0)
  442. wait()
  443. end
  444. Model:Remove()
  445. end)()
  446. end
  447. if OldHealth - Character.Humanoid.Health >= 3 then
  448. if _G.RobloxAdvanced.BloodEnabled == true then
  449. local Max = math.ceil((OldHealth - Character.Humanoid.Health) * 2)
  450. for i = 1, (Max > 20 and 20 or Max + 1) do
  451. local Blood = _G.RobloxAdvanced.MakeBlood()
  452. Blood.CFrame = Source.CFrame * CFrame.new(math.random(-2, 2), math.random(-2, 2), math.random(-2, 2))
  453. Blood.Velocity = (Blood.Position - Source.Position).unit * math.random(5, 25)
  454. Blood.Parent = Workspace
  455. end
  456. end
  457. local Player = game:GetService("Players"):GetPlayerFromCharacter(Character)
  458. if Player ~= nil and _G.RobloxAdvanced.BloodGuiEnabled == true then
  459. local PlayerGui = Player:FindFirstChild("PlayerGui")
  460. if PlayerGui == nil then PlayerGui = Instance.new("PlayerGui", Player) end
  461. if PlayerGui:FindFirstChild("Pain") ~= nil then PlayerGui.Pain:Remove() end
  462. local Gui = Instance.new("ScreenGui")
  463. Gui.Name = "Pain"
  464. local Frame = Instance.new("Frame")
  465. Frame.Name = "Red"
  466. Frame.Size = UDim2.new(2, 0, 2, 0)
  467. Frame.Position = UDim2.new(-0.5, 0, -0.5, 0)
  468. Frame.BackgroundColor3 = Color3.new(1, 0, 0)
  469. Frame.BackgroundTransparency = (math.abs(OldHealth - Character.Humanoid.Health) / Character.Humanoid.MaxHealth) * 1.2
  470. Frame.Parent = Gui
  471. Gui.Parent = PlayerGui
  472. coroutine.wrap(function()
  473. for i = Frame.BackgroundTransparency, 1, 0.05 do
  474. Frame.BackgroundTransparency = i
  475. wait()
  476. end
  477. Gui:Remove()
  478. end)()
  479. end
  480. end
  481. if (OldHealth - Character.Humanoid.Health) / Character.Humanoid.MaxHealth > 0.25 and _G.RobloxAdvanced.CriticalHitsEnabled == true and Character.Humanoid.Health > 0 and RagdollStatus == false then
  482. RagdollStatus = true
  483. _G.RobloxAdvanced.Ragdoll(true, Character)
  484. Character.Humanoid.PlatformStand = true
  485. local Sound = Instance.new("Sound", Character.Torso)
  486. Sound.SoundId = "http://www.roblox.com/Asset/?id=2801263"
  487. Sound.Volume = 1
  488. Sound.Pitch = math.random(500, 700) / 1000
  489. Sound:Play()
  490. local Player = game:GetService("Players"):GetPlayerFromCharacter(Character)
  491. if Player ~= nil then
  492. local PlayerGui = Player:FindFirstChild("PlayerGui")
  493. if PlayerGui == nil then return end
  494. if PlayerGui:FindFirstChild("Pain") ~= nil then PlayerGui.Pain:Remove() end
  495. if PlayerGui:FindFirstChild("Critical Hit") ~= nil then PlayerGui.Pain:Remove() end
  496. local Gui = Instance.new("ScreenGui", PlayerGui)
  497. Gui.Name = "Critical Hit"
  498. local Frame = Instance.new("Frame", Gui)
  499. Frame.Name = "Yellow"
  500. Frame.Size = UDim2.new(2, 0, 2, 0)
  501. Frame.Position = UDim2.new(-0.5, 0, -0.5, 0)
  502. Frame.BackgroundColor3 = Color3.new(0.9, 0.9, 0)
  503. Frame.BackgroundTransparency = 0
  504. coroutine.wrap(function()
  505. for i = 0, 1, 0.01 do
  506. Frame.BackgroundTransparency = i
  507. wait()
  508. end
  509. Gui:Remove()
  510. end)()
  511. for i = 1, 5 do
  512. local Label = Instance.new("TextLabel", Frame)
  513. Label.Name = "Notification"
  514. Label.Position = UDim2.new(0.5, 0, 0.5, 0)
  515. Label.Text = "CRITICAL HIT"
  516. Label.FontSize = "Size18"
  517. Label.TextColor3 = Color3.new(1, 0.5, 0)
  518. Label.TextTransparency = 0
  519. coroutine.wrap(function()
  520. while Label.Parent ~= nil do
  521. Label.Position = UDim2.new(0.5, math.random(-25, 25), 0.5, math.random(-25, 25))
  522. Label.FontSize = "Size" ..tostring((function()
  523. local Size = math.random(1, 5)
  524. if Size == 1 then
  525. return 14
  526. elseif Size == 2 then
  527. return 18
  528. elseif Size == 3 then
  529. return 24
  530. elseif Size == 4 then
  531. return 36
  532. elseif Size == 5 then
  533. return 48
  534. end
  535. end)())
  536. wait()
  537. end
  538. end)()
  539. coroutine.wrap(function()
  540. for i = 0.01, 1, 0.05 do
  541. Label.TextTransparency = i
  542. wait()
  543. end
  544. end)()
  545. end
  546. end
  547. coroutine.wrap(function()
  548. wait(3)
  549. Character.Humanoid.PlatformStand = false
  550. wait(5)
  551. RagdollStatus = false
  552. end)()
  553. end
  554. OldHealth = Character.Humanoid.Health
  555. end
  556. end))
  557. table.insert(_G.RobloxAdvanced.Connections, Character.Humanoid.Died:connect(function()
  558. local Humanoid = Character:FindFirstChild("Humanoid")
  559. if Humanoid == nil then return end
  560. local Player = game:GetService("Players"):GetPlayerFromCharacter(Character)
  561. local Killer = nil
  562. if Humanoid:FindFirstChild("creator") ~= nil then
  563. Killer = Humanoid.creator.Value
  564. end
  565. if Killer ~= nil then
  566. if Killer:FindFirstChild("RobloxAdvancedKills") == nil then
  567. Instance.new("IntValue", Killer).Name = "RobloxAdvancedKills"
  568. end
  569. if Killer:FindFirstChild("RobloxAdvancedKillstreak") == nil then
  570. Instance.new("IntValue", Killer).Name = "RobloxAdvancedKillstreak"
  571. end
  572. if Player ~= nil and Player.Neutral == false and Killer.Neutral == false and Player.TeamColor == Killer.TeamColor then
  573. Killer.RobloxAdvancedKills.Value = Killer.RobloxAdvancedKills.Value - 2
  574. Killer.RobloxAdvancedKillstreak.Value = 0
  575. else
  576. Killer.RobloxAdvancedKills.Value = Killer.RobloxAdvancedKills.Value + 1
  577. Killer.RobloxAdvancedKillstreak.Value = Killer.RobloxAdvancedKillstreak.Value + 1
  578. end
  579. end
  580. if Player ~= nil then
  581. if Player:FindFirstChild("RobloxAdvancedDeaths") == nil then
  582. Instance.new("IntValue", Player).Name = "RobloxAdvancedDeaths"
  583. end
  584. if Player:FindFirstChild("RobloxAdvancedKillstreak") == nil then
  585. Instance.new("IntValue", Player).Name = "RobloxAdvancedKillstreak"
  586. end
  587. Player.RobloxAdvancedDeaths.Value = Player.RobloxAdvancedDeaths.Value + 1
  588. Player.RobloxAdvancedKillstreak.Value = 0
  589. end
  590. if _G.RobloxAdvanced.RagdollOnDeath == true then
  591. _G.RobloxAdvanced.Ragdoll(true, Character, true)
  592. end
  593. coroutine.wrap(function()
  594. if _G.RobloxAdvanced.DeathGuiEnabled == false then return end
  595. if Player == nil then return end
  596. local PlayerGui = Player:FindFirstChild("PlayerGui")
  597. if PlayerGui == nil then return end
  598. local Gui = Instance.new("ScreenGui")
  599. Gui.Name = "Death"
  600. local Frame = Instance.new("Frame")
  601. Frame.Name = "Black"
  602. Frame.Size = UDim2.new(2, 0, 2, 0)
  603. Frame.Position = UDim2.new(-0.5, 0, -0.5, 0)
  604. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  605. Frame.BackgroundTransparency = 1
  606. Frame.Parent = Gui
  607. local Label = Instance.new("TextLabel")
  608. Label.Name = "Notification"
  609. Label.Position = UDim2.new(0.5, 0, 0.5, 0)
  610. if Killer ~= nil then
  611. if Killer == Player then
  612. Label.Text = "You have killed yourself."
  613. else
  614. Label.Text = "You have been killed by " ..Killer.Name.. "."
  615. end
  616. else
  617. Label.Text = "You have died."
  618. end
  619. Label.FontSize = "Size24"
  620. Label.TextColor3 = Color3.new(1, 0.5, 0)
  621. Label.TextTransparency = 1
  622. Label.Parent = Frame
  623. Gui.Parent = PlayerGui
  624. wait(0.5)
  625. for i = 1, 0, -0.05 do
  626. Label.TextTransparency = i
  627. wait()
  628. end
  629. Label.BackgroundTransparency = 0
  630. wait(0.5)
  631. for i = 1, 0, -0.025 do
  632. Frame.BackgroundTransparency = i
  633. wait()
  634. end
  635. Frame.BackgroundTransparency = 0
  636. wait(0.5)
  637. for i = 0, 1, 0.05 do
  638. Label.TextTransparency = i
  639. wait()
  640. end
  641. Label.BackgroundTransparency = 1
  642. end)()
  643. wait(4.5)
  644. if Character == nil or _G.RobloxAdvanced.KeepCorpses == false then return end
  645. if Character.Parent == nil then return end
  646. local ReweldNeck = false
  647. if Character:FindFirstChild("Torso") ~= nil then
  648. if Character.Torso:FindFirstChild("Neck") ~= nil then
  649. ReweldNeck = true
  650. end
  651. end
  652. local Model = Instance.new("Model", Workspace)
  653. Model.Name = Character.Name.. "'s Corpse"
  654. for _, Part in pairs(Character:GetChildren()) do
  655. if Part.ClassName == "CharacterMesh" or Part:IsA("Clothing") or Part.ClassName == "ShirtGraphic" then
  656. Part:Clone().Parent = Model
  657. end
  658. for _, Part2 in pairs(Part:GetChildren()) do
  659. if Part2.ClassName == "Sound" then
  660. Part2.SoundId = ""
  661. Part2.Looped = false
  662. Part2.PlayOnRemove = false
  663. Part2.Volume = 0
  664. Part2.Pitch = 0
  665. Part2:Stop()
  666. end
  667. end
  668. if Part.ClassName == "Part" then
  669. pcall(function()
  670. Part.Parent = Model
  671. Part.CanCollide = true
  672. end)
  673. end
  674. end
  675. local Humanoid = Instance.new("Humanoid")
  676. Humanoid.Name = "Corpse"
  677. Humanoid.Health = 0
  678. Humanoid.WalkSpeed = 0
  679. Humanoid.PlatformStand = true
  680. Humanoid.Parent = Model
  681. if ReweldNeck == true then
  682. local Neck = Instance.new("Weld")
  683. Neck.Part0 = Torso
  684. Neck.Part1 = Head
  685. Neck.C0 = CFrame.new(0, 1.5, 0)
  686. Neck.Parent = Torso
  687. end
  688. game:GetService("Debris"):AddItem(Model, _G.RobloxAdvanced.KeepCorpsesTime)
  689. end))
  690. table.insert(_G.RobloxAdvanced.Connections, Character.Humanoid.FallingDown:connect(function() _G.RobloxAdvanced.Ragdoll(true, Character) end))
  691. table.insert(_G.RobloxAdvanced.Connections, Character.Humanoid.GettingUp:connect(function() _G.RobloxAdvanced.Ragdoll(false, Character) end))
  692. coroutine.wrap(function()
  693. local function RemoveLimb(Name)
  694. if Character:FindFirstChild(Name) == nil then return false end
  695. local Model = Instance.new("Model")
  696. Model.Name = "Decapitated Limb"
  697. for _, Part in pairs(Character:GetChildren()) do
  698. if Part.ClassName == "CharacterMesh" or Part:IsA("Clothing") then
  699. Part:Clone().Parent = Model
  700. end
  701. if Part.Name == Name then
  702. pcall(function()
  703. Part.Parent = Model
  704. Part.CanCollide = true
  705. Part:BreakJoints()
  706. end)
  707. end
  708. end
  709. local Humanoid = Instance.new("Humanoid")
  710. Humanoid.Name = "Corpse"
  711. Humanoid.Health = 0
  712. Humanoid.MaxHealth = 0
  713. Humanoid.WalkSpeed = 0
  714. Humanoid.PlatformStand = true
  715. Humanoid.Parent = Model
  716. Model.Parent = Workspace
  717. game:GetService("Debris"):AddItem(Model, _G.RobloxAdvanced.KeepCorpsesTime)
  718. return true, Model
  719. end
  720. while true do
  721. if Character.Parent == nil then break end
  722. if Character:FindFirstChild("Torso") == nil then break end
  723. if Character:FindFirstChild("Humanoid") == nil then break end
  724. if Character.Torso:FindFirstChild("Left Shoulder") == nil and Character.Torso:FindFirstChild("LeftShoulder") == nil and Character.Torso:FindFirstChild("Left Shoulder 2") == nil then
  725. local Blood = _G.RobloxAdvanced.MakeBlood()
  726. Blood.CFrame = Character.Torso.CFrame * CFrame.new(-1.2, 0.5, 0)
  727. Blood.Velocity = (Blood.Position - (Character.Torso.CFrame * CFrame.new(0, 0.5, 0)).p).unit * math.random(10, 25)
  728. Blood.Parent = _G.RobloxAdvanced.BloodEnabled == true and Workspace
  729. if Character:FindFirstChild("Humanoid") ~= nil then Character.Humanoid:TakeDamage(0.25) end
  730. if Character:FindFirstChild("Left Arm") ~= nil then RemoveLimb("Left Arm") end
  731. end
  732. if Character.Torso:FindFirstChild("Right Shoulder") == nil and Character.Torso:FindFirstChild("RightShoulder") == nil and Character.Torso:FindFirstChild("Right Shoulder 2") == nil then
  733. local Blood = _G.RobloxAdvanced.MakeBlood()
  734. Blood.CFrame = Character.Torso.CFrame * CFrame.new(1.2, 0.5, 0)
  735. Blood.Velocity = (Blood.Position - (Character.Torso.CFrame * CFrame.new(0, 0.5, 0)).p).unit * math.random(10, 25)
  736. Blood.Parent = _G.RobloxAdvanced.BloodEnabled == true and Workspace
  737. if Character:FindFirstChild("Humanoid") ~= nil then Character.Humanoid:TakeDamage(0.25) end
  738. if Character:FindFirstChild("Right Arm") ~= nil then RemoveLimb("Right Arm") end
  739. end
  740. if Character.Torso:FindFirstChild("Left Hip") == nil and Character.Torso:FindFirstChild("LeftHip") == nil and Character.Torso:FindFirstChild("Left Hip 2") == nil then
  741. local Blood = _G.RobloxAdvanced.MakeBlood()
  742. Blood.CFrame = Character.Torso.CFrame * CFrame.new(-0.5, -1.2, 0)
  743. Blood.Velocity = (Blood.Position - (Character.Torso.CFrame * CFrame.new(-0.5, 0, 0)).p).unit * math.random(4, 8)
  744. Blood.Parent = _G.RobloxAdvanced.BloodEnabled == true and Workspace
  745. if Character:FindFirstChild("Humanoid") ~= nil then Character.Humanoid:TakeDamage(0.25) end
  746. if Character:FindFirstChild("Left Leg") ~= nil then RemoveLimb("Left Leg") end
  747. end
  748. if Character.Torso:FindFirstChild("Right Hip") == nil and Character.Torso:FindFirstChild("RightHip") == nil and Character.Torso:FindFirstChild("Right Hip 2") == nil then
  749. local Blood = _G.RobloxAdvanced.MakeBlood()
  750. Blood.CFrame = Character.Torso.CFrame * CFrame.new(0.5, -1.2, 0)
  751. Blood.Velocity = (Blood.Position - (Character.Torso.CFrame * CFrame.new(0.5, 0, 0)).p).unit * math.random(4, 80)
  752. Blood.Parent = _G.RobloxAdvanced.BloodEnabled == true and Workspace
  753. if Character:FindFirstChild("Humanoid") ~= nil then Character.Humanoid:TakeDamage(0.25) end
  754. if Character:FindFirstChild("Right Leg") ~= nil then RemoveLimb("Right Leg") end
  755. end
  756. if Character.Torso:FindFirstChild("Neck") == nil then
  757. local Blood = _G.RobloxAdvanced.MakeBlood()
  758. Blood.CFrame = Character.Torso.CFrame * CFrame.new(0, 1, 0)
  759. Blood.Velocity = (Blood.Position - Character.Torso.Position).unit * math.random(25, 75)
  760. Blood.Parent = _G.RobloxAdvanced.BloodEnabled == true and Workspace
  761. if Character:FindFirstChild("Head") ~= nil then
  762. local Blood = _G.RobloxAdvanced.MakeBlood()
  763. Blood.CFrame = Character.Head.CFrame * CFrame.new(0, -0.5, 0)
  764. Blood.Velocity = (Blood.Position - Character.Head.Position).unit * math.random(5, 25)
  765. Blood.Parent = Workspace
  766. end
  767. end
  768. wait(0.11)
  769. end
  770. end)()
  771. end
  772. _G.RobloxAdvanced.Ragdoll = function(Format, Character, Force)
  773. if Force ~= true then
  774. if Character:FindFirstChild("Ragdoll") ~= nil and Format == true then return false end
  775. if Character:FindFirstChild("Ragdoll") == nil and Format == false then return false end
  776. end
  777. local Head = nil
  778. local Torso = nil
  779. local Humanoid = nil
  780. local Dead = false
  781. for _, Children in pairs(Character:GetChildren()) do
  782. if Children.ClassName == "ForceField" then Children:Remove() end
  783. if Children.Name == "" then Children:Remove() end
  784. if Children.Name == "Head" then Head = Children end
  785. if Children.Name == "Torso" then Torso = Children end
  786. if Children.ClassName == "Humanoid" then Humanoid = Children end
  787. if Children:IsA("Accoutrement") then
  788. if Children:FindFirstChild("Handle") ~= nil then
  789. if math.random(1, 3) == 1 then
  790. coroutine.wrap(function()
  791. Children.Parent = Workspace
  792. wait()
  793. Children.Parent = Character
  794. Children.Handle.CanCollide = true
  795. end)()
  796. else
  797. Children.Parent = Workspace
  798. Children.Handle.CanCollide = true
  799. end
  800. else
  801. Children:Remove()
  802. end
  803. end
  804. end
  805. if Humanoid ~= nil then
  806. if Humanoid.Health <= 0 then
  807. Dead = true
  808. end
  809. end
  810. if Torso ~= nil then
  811. for _, Children2 in pairs(Torso:GetChildren()) do
  812. if Children2:IsA("JointInstance") then
  813. Children2:Remove()
  814. end
  815. end
  816. end
  817. if Head ~= nil and (function()
  818. if Dead == true and math.random(1, 2) == 1 then
  819. return true
  820. else
  821. return false
  822. end
  823. end)() == false then
  824. local Neck = Instance.new("Motor6D")
  825. Neck.Name = "Neck"
  826. Neck.Part0 = Torso
  827. Neck.Part1 = Head
  828. Neck.C0 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(180))
  829. Neck.C1 = CFrame.new(0, -0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, math.rad(180))
  830. Neck.MaxVelocity = 0.1
  831. Neck.Parent = Torso
  832. end
  833. if Format == true then
  834. local Ragdoll = Instance.new("IntValue")
  835. Ragdoll.Name = "Ragdoll"
  836. Ragdoll.Parent = Character
  837. if Torso ~= nil then
  838. Torso.Velocity = Torso.Velocity / 1.25
  839. Torso.RotVelocity = (Torso.RotVelocity / 1.25) + Vector3.new(math.random(-25, 25), math.random(-25, 25), math.random(-25, 25))
  840. if Dead == true then
  841. if Humanoid ~= nil then
  842. local Humanoid2 = Humanoid:Clone()
  843. wait()
  844. Humanoid:Remove()
  845. Humanoid2.Parent = Character
  846. Humanoid = Humanoid2
  847. end
  848. end
  849. local Limb = Character:FindFirstChild("Right Arm")
  850. if Limb ~= nil then
  851. Limb.Velocity = Torso.Velocity
  852. Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
  853. local Joint = Instance.new("Glue")
  854. Joint.Name = "RightShoulder"
  855. Joint.Part0 = Torso
  856. Joint.Part1 = Limb
  857. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  858. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  859. Joint.Parent = Torso
  860. local Weight = Instance.new("Part")
  861. Weight.Name = ""
  862. Weight.TopSurface = 0
  863. Weight.BottomSurface = 0
  864. Weight.Shape = "Block"
  865. Weight.FormFactor = "Custom"
  866. Weight.Size = Vector3.new(1, 1, 1)
  867. Weight.Transparency = 1
  868. Weight.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  869. Weight.Parent = Character
  870. local Weld = Instance.new("Weld")
  871. Weld.Part0 = Limb
  872. Weld.Part1 = Weight
  873. Weld.C0 = CFrame.new(0, -0.5, 0)
  874. Weld.Parent = Limb
  875. end
  876. local Limb = Character:FindFirstChild("Left Arm")
  877. if Limb then
  878. Limb.Velocity = Torso.Velocity
  879. Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
  880. local Joint = Instance.new("Glue")
  881. Joint.Name = "LeftShoulder"
  882. Joint.Part0 = Torso
  883. Joint.Part1 = Limb
  884. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  885. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  886. Joint.Parent = Torso
  887. local Weight = Instance.new("Part")
  888. Weight.Name = ""
  889. Weight.TopSurface = 0
  890. Weight.BottomSurface = 0
  891. Weight.Shape = "Block"
  892. Weight.FormFactor = "Custom"
  893. Weight.Size = Vector3.new(1, 1, 1)
  894. Weight.Transparency = 1
  895. Weight.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  896. Weight.Parent = Character
  897. local Weld = Instance.new("Weld")
  898. Weld.Part0 = Limb
  899. Weld.Part1 = Weight
  900. Weld.C0 = CFrame.new(0, -0.5, 0)
  901. Weld.Parent = Limb
  902. end
  903. local Limb = Character:FindFirstChild("Right Leg")
  904. if Limb then
  905. Limb.Velocity = Torso.Velocity
  906. Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
  907. local Joint = Instance.new("Glue")
  908. Joint.Name = "RightHip"
  909. Joint.Part0 = Torso
  910. Joint.Part1 = Limb
  911. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  912. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  913. Joint.Parent = Torso
  914. local Weight = Instance.new("Part")
  915. Weight.Name = ""
  916. Weight.TopSurface = 0
  917. Weight.BottomSurface = 0
  918. Weight.Shape = "Block"
  919. Weight.FormFactor = "Custom"
  920. Weight.Size = Vector3.new(1, 1, 1)
  921. Weight.Transparency = 1
  922. Weight.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  923. Weight.Parent = Character
  924. local Weld = Instance.new("Weld")
  925. Weld.Part0 = Limb
  926. Weld.Part1 = Weight
  927. Weld.C0 = CFrame.new(0, -0.5, 0)
  928. Weld.Parent = Limb
  929. end
  930. local Limb = Character:FindFirstChild("Left Leg")
  931. if Limb then
  932. Limb.Velocity = Torso.Velocity
  933. Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
  934. local Joint = Instance.new("Glue")
  935. Joint.Name = "LeftHip"
  936. Joint.Part0 = Torso
  937. Joint.Part1 = Limb
  938. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  939. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  940. Joint.Parent = Torso
  941. local Weight = Instance.new("Part")
  942. Weight.Name = ""
  943. Weight.TopSurface = 0
  944. Weight.BottomSurface = 0
  945. Weight.Shape = "Block"
  946. Weight.FormFactor = "Custom"
  947. Weight.Size = Vector3.new(1, 1, 1)
  948. Weight.Transparency = 1
  949. Weight.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  950. Weight.Parent = Character
  951. local Weld = Instance.new("Weld")
  952. Weld.Part0 = Limb
  953. Weld.Part1 = Weight
  954. Weld.C0 = CFrame.new(0, -0.5, 0)
  955. Weld.Parent = Limb
  956. end
  957. local Weight = Instance.new("Part")
  958. Weight.Name = ""
  959. Weight.TopSurface = 0
  960. Weight.BottomSurface = 0
  961. Weight.Shape = "Block"
  962. Weight.FormFactor = "Custom"
  963. Weight.Size = Vector3.new(1.75, 1.5, 1.1)
  964. Weight.Transparency = 1
  965. Weight.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
  966. Weight.Parent = Character
  967. local Weld = Instance.new("Weld")
  968. Weld.Part0 = Torso
  969. Weld.Part1 = Weight
  970. Weld.C0 = CFrame.new(0, 0.5, 0)
  971. Weld.Parent = Torso
  972. end
  973. elseif Format == false then
  974. if Character:FindFirstChild("Ragdoll") ~= nil then Character.Ragdoll:Remove() end
  975. if Torso ~= nil then
  976. local Limb = Character:FindFirstChild("Right Arm")
  977. if Limb ~= nil then
  978. local Joint = Instance.new("Motor6D")
  979. Joint.Name = "Right Shoulder"
  980. Joint.Part0 = Torso
  981. Joint.Part1 = Limb
  982. Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  983. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  984. Joint.MaxVelocity = 0.15
  985. Joint.Parent = Torso
  986. end
  987. local Limb = Character:FindFirstChild("Left Arm")
  988. if Limb ~= nil then
  989. local Joint = Instance.new("Motor6D")
  990. Joint.Name = "Left Shoulder"
  991. Joint.Part0 = Torso
  992. Joint.Part1 = Limb
  993. Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  994. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  995. Joint.MaxVelocity = 0.15
  996. Joint.Parent = Torso
  997. end
  998. local Limb = Character:FindFirstChild("Right Leg")
  999. if Limb ~= nil then
  1000. local Joint = Instance.new("Motor6D")
  1001. Joint.Name = "Right Hip"
  1002. Joint.Part0 = Torso
  1003. Joint.Part1 = Limb
  1004. Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1005. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  1006. Joint.MaxVelocity = 0.1
  1007. Joint.Parent = Torso
  1008. end
  1009. local Limb = Character:FindFirstChild("Left Leg")
  1010. if Limb ~= nil then
  1011. local Joint = Instance.new("Motor6D")
  1012. Joint.Name = "Left Hip"
  1013. Joint.Part0 = Torso
  1014. Joint.Part1 = Limb
  1015. Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1016. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  1017. Joint.MaxVelocity = 0.1
  1018. Joint.Parent = Torso
  1019. end
  1020. local Animate = Character:FindFirstChild("Animate")
  1021. if Animate ~= nil then
  1022. local Animate2 = Animate:Clone()
  1023. Animate:Remove()
  1024. Animate2.Parent = Character
  1025. end
  1026. end
  1027. else
  1028. return false
  1029. end
  1030. return true, Format
  1031. end
  1032. table.insert(_G.RobloxAdvanced.Connections, Workspace.DescendantAdded:connect(_G.RobloxAdvanced.HookModelDeath))
  1033. table.insert(_G.RobloxAdvanced.Connections, game:GetService("Players").PlayerAdded:connect(_G.RobloxAdvanced.HookPlayerDeath))
  1034. for _, Players in pairs(game:GetService("Players"):GetPlayers()) do
  1035. _G.RobloxAdvanced.HookPlayerDeath(Players)
  1036. end
  1037. for _, Children in pairs(Workspace:GetChildren()) do
  1038. _G.RobloxAdvanced.HookModelDeath(Children)
  1039. end
Add Comment
Please, Sign In to add comment