jericoalejo

Freeze tag in roblox script

Dec 3rd, 2016
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. me = game.Players.Jericoalejo
  2. tag1 = game.Players.Aethron
  3.  
  4. local tagger = Instance.new("BoolValue")
  5. tagger.Name = "Tag"
  6. tagger.Parent = me.Character
  7. tagger.Value = true
  8. local tagger2 = Instance.new("BoolValue")
  9. tagger2.Parent = tag1.Character
  10. tagger2.Value = true
  11. tagger2.Name = "Tag"
  12.  
  13. local spark1 = Instance.new("Sparkles")
  14. spark1.Parent = tag1.Character
  15. spark1.Color = Color3.new(0,1,1)
  16. local spark2 = Instance.new("Sparkles")
  17. spark2.Parent = me.Character
  18. spark2.Color = Color3.new(0,1,1)
  19.  
  20. local ices = Instance.new("Model")
  21. ices.Parent = game.Workspace
  22.  
  23. players = game.Players:GetChildren()
  24. for i=1, #players do
  25. local val = Instance.new("NumberValue")
  26. val.Parent = players[i].Character
  27. val.Value = 0
  28. val.Name = "Froze"
  29. end
  30.  
  31. function freeze(hit)
  32. local ple = game.Players:findFirstChild(hit.Parent.Name)
  33. if ple ~= nil then
  34. if ple.Character.Tag == nil then return end
  35. if ple.Character.Froze == nil then
  36. local vald = Instance.new("NumberValue")
  37. vald.Name = "Froze"
  38. vald.Value = 0
  39. vald.Parent = ple.Character
  40. end
  41. if ple.Character.Froze.Value == 1 then return end
  42. ple.Character.Froze.Value = 1
  43. local part = Instance.new("Part")
  44. part.Name = "Ice"
  45. part.BrickColor = BrickColor.new("Light blue")
  46. part.Reflectance = 0.2
  47. part.Transparency = 0.2
  48. part.formFactor = "Symmetric"
  49. part.Size = Vector3.new(5,9,5)
  50. part.TopSurface = "Smooth"
  51. part.BottomSurface = "Smooth"
  52. part.CanCollide = false
  53. part.CFrame = ple.Character.Torso.CFrame
  54. part.Anchored = true
  55. part.Parent = ices
  56. local playa = Instance.new("StringValue")
  57. playa.Parent = part
  58. playa.Value = ple.Name
  59. playa.Name = "tagged"
  60. ple.Character.Torso.Anchored = true
  61. ple.Character.Humanoid.WalkSpeed = 0
  62. end
  63. end
  64.  
  65.  
  66. me.Character.Torso.Touched:connect(freeze)
  67. tag1.Character.Torso.Touched:connect(freeze)
Add Comment
Please, Sign In to add comment