Advertisement
Guest User

rehad

a guest
Nov 25th, 2014
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. admins = {"ExplosiveCrayon","lockonstratos","player"} --People who can spawn the bubble
  2. Activator = "protect/" --Change this for the command ect... protect/mallinson2648 , protect/me
  3. --To edit the effect of the script change the script inside this script
  4.  
  5.  
  6.  
  7. function Bubble(Player)
  8. if Player.Character:findFirstChild("Torso") == nil then return end
  9. if Player.Character.Torso:findFirstChild("Bubble") == nil then
  10. p = Instance.new("Part")
  11. p.Size = Vector3.new(7,7,7)
  12. p.CanCollide = false
  13. p.Transparency = .4
  14. p.Name = "Bubble"
  15. p.Shape = 0
  16. p.TopSurface = 0
  17. p.BottomSurface = 0
  18. p.CFrame = Player.Character.Torso.CFrame
  19. w = Instance.new("Weld")
  20. w.Part0 = p
  21. w.Part1 = Player.Character.Torso
  22. w.Parent = Player.Character.Torso
  23. f = Instance.new("BodyForce")
  24. f.force = Vector3.new(0,196.2*p:GetMass()/2,0)
  25. f.Parent = p
  26. p.Parent = Player.Character.Torso
  27. y = script.Effect:clone()
  28. y.Disabled = false
  29. y.Parent = p
  30. else
  31. Player.Character.Torso.Bubble:remove()
  32. end
  33. end
  34.  
  35. function Parse(rep,message)
  36. if string.sub(message,1,string.len(Activator)) == Activator then
  37. for i,player in ipairs(game.Players:GetChildren()) do
  38. if string.sub(message,string.len(Activator)+1) == player.Name then Bubble(player) end
  39. end
  40. if string.sub(message,string.len(Activator)+1) == "me" then Bubble(rep) end
  41. end
  42. end
  43.  
  44.  
  45. for i,player in ipairs(game.Players:GetChildren()) do
  46. for j,admin in ipairs(admins) do
  47. if string.lower(player.Name) == string.lower(admin) then player.Chatted:connect(function(mes,rep) Parse(player,mes) end) end
  48. end
  49. end
  50. game.Players.ChildAdded:connect(function(player) if string.lower(player.Name) == string.lower(admin) then player.Chatted:connect(function(mes,rep) Parse(player,mes) end) end end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement