Advertisement
HenloMyDude

shield thing

Nov 3rd, 2019
447
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1.  
  2. plr = owner
  3. equip = false
  4. char = Instance.new("Model",script)
  5. char.Name = plr.Name .."Shield"
  6. tool = Instance.new("Tool",nil)
  7. tool.Name = plr.Name .." Shield"
  8. tool.Equipped:connect(function()
  9. equip = true
  10. if tool.Parent:FindFirstChildOfClass("Humanoid") then
  11. local hum = tool.Parent:FindFirstChildOfClass("Humanoid")
  12. end
  13. --local ff = Instance.new("ForceField",tool.Parent)
  14. --ff.Visible = false
  15. end)
  16. tool.Unequipped:connect(function()
  17. equip = false
  18. local lechar = tool.Parent.Character
  19. for _,v in pairs (lechar:children()) do
  20. if v:IsA("ForceField") then
  21. v:Destroy()
  22. end
  23. end
  24. end)
  25. face = plr.Character.Head:FindFirstChild("face")
  26. if face then
  27. tool.TextureId = face.Texture
  28. end
  29. main = Instance.new("Part",char)
  30. main.Size = Vector3.new(2.5, 4, 1)
  31. main.BrickColor = plr.Character.Head.BrickColor
  32. main.Material = "Plastic"
  33. main.Name = "Handle"
  34. main.Position = plr.Character.Head.Position
  35. newface = Instance.new("Decal",main)
  36. if face then
  37. newface.Texture = face.Texture
  38. end
  39. newface.Face = "Front"
  40. detect = Instance.new("ClickDetector",main)
  41. detect.MaxActivationDistance = 16
  42. detect.MouseClick:connect(function(player)
  43. if player ~= owner then
  44. main.Parent = tool
  45. tool.Parent = player.Backpack
  46. detect:Destroy()
  47. local char2 = player.Character
  48. local hum = char2:FindFirstChildOfClass("Humanoid")
  49. if hum then
  50. local h = hum
  51. local hp = h.Health
  52. h.HealthChanged:connect(function()
  53. if h.Health < hp then
  54. if h.Health > 0 then
  55. if equip then
  56. h.Health = hp
  57. main.Material = "Neon"
  58. local s = Instance.new("Sound",main) s.Volume = 3 s.SoundId = "rbxassetid://2851048981" s:Play()
  59. --newface.Texture = "rbxassetid://7317691"
  60. wait(.35)
  61. main.Material = "Plastic"
  62. --newface.Texture = face.Texture
  63. end
  64. end
  65. hp = h.Health
  66. end
  67. end)
  68. end
  69. end
  70. end)
  71. plr.Character.Parent = nil
  72. plr.Character = char
  73. NLS([[
  74.  
  75. workspace.CurrentCamera.CameraSubject = owner.Character.Handle
  76.  
  77. ]],char)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement