Advertisement
yonidrori

Untitled

Sep 13th, 2015
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. --[[
  2. --//Scripted by AnimeWiki
  3. --//06.28.2015
  4. --//http://www.roblox.com/User.aspx?ID=71436898
  5. ]]
  6.  
  7.  
  8. local player = game:FindService("Players").LocalPlayer;
  9.  
  10. player.CharacterAdded:connect(function(character)
  11. character:WaitForChild("Body Colors");
  12. end);
  13.  
  14. local character = player.Character;
  15.  
  16. local part = Instance.new("Part", character);
  17. part.Shape = Enum.PartType.Block;
  18. part.FormFactor = Enum.FormFactor.Custom;
  19. part.Locked = true;
  20. part.CanCollide = false;
  21. part.Anchored = true;
  22. --part.Material = Enum.Material.Ice;
  23. part.BrickColor = BrickColor.new("Bright green");
  24. part.BottomSurface = Enum.SurfaceType.Smooth;
  25. part.TopSurface = Enum.SurfaceType.Smooth;
  26.  
  27.  
  28. local part2 = Instance.new("Part", character);
  29. part2.Shape = Enum.PartType.Block;
  30. part2.FormFactor = Enum.FormFactor.Custom;
  31. part2.Locked = true;
  32. part2.CanCollide = false;
  33. part2.Anchored = true;
  34. --part2.Material = Enum.Material.Ice;
  35. part2.BrickColor = BrickColor.new("Bright red");
  36. part2.BottomSurface = Enum.SurfaceType.Smooth;
  37. part2.TopSurface = Enum.SurfaceType.Smooth;
  38.  
  39.  
  40. local humanoid = character:WaitForChild("Humanoid");
  41.  
  42. local torso = character:WaitForChild("Torso");
  43.  
  44. local i = 0;
  45.  
  46. game:GetService("RunService").RenderStepped:connect(function()
  47. if i >= 360 then
  48. i = 0;
  49. end;
  50. i = i + 1;
  51. local health = humanoid.Health/humanoid.MaxHealth;
  52.  
  53. if health > 0 then
  54. part.Transparency = 0;
  55. part.Size = Vector3.new(health *4, 0.5, 0.5);
  56. part.CFrame = torso.CFrame *CFrame.new(part.Size.X/2 - 2, 4, 0) *CFrame.fromEulerAnglesXYZ(-math.rad(i),0,0);
  57. else
  58. part.Transparency = 1;
  59. end;
  60.  
  61. if health < 1 then
  62. part2.Transparency = 0;
  63. part2.Size = Vector3.new((1 - health)* 4, 0.5, 0.5);
  64. part2.CFrame = torso.CFrame *CFrame.new(part.Size.X/2, 4, 0) *CFrame.fromEulerAnglesXYZ(-math.rad(i),0,0);
  65. else
  66. part2.Transparency = 1;
  67. end;
  68.  
  69. end);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement