Advertisement
Guest User

Disappearing Block Script!

a guest
May 5th, 2020
1,174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. enabled = 0
  2. val = 0
  3.  
  4. function onTouched(part)
  5.  
  6.  
  7.  
  8. local h = part.Parent:findFirstChild("Humanoid")
  9. if (h ~=nil) then
  10.  
  11. if (enabled == 0) then
  12. enabled = 1
  13. val = val+0.1
  14. script.Parent.Transparency = val
  15. script.Parent.CanCollide = true
  16. wait(.1)
  17. val = val+0.1
  18. script.Parent.Transparency = 0.1+val
  19. script.Parent.CanCollide = true
  20. wait(.1)
  21. val = val+0.1
  22. script.Parent.Transparency = 0.1+val
  23. script.Parent.CanCollide = true
  24. wait(.1)
  25. val = val+0.1
  26. script.Parent.Transparency = 0.1+val
  27. script.Parent.CanCollide = true
  28. wait(.1)
  29. val = val+0.1
  30. script.Parent.Transparency = 0.1+val
  31. script.Parent.CanCollide = true
  32. wait(.1)
  33. val = val+0.1
  34. script.Parent.Transparency = 0.1+val
  35. script.Parent.CanCollide = true
  36. wait(.1)
  37. val = val+0.1
  38. script.Parent.Transparency = 0.1+val
  39. script.Parent.CanCollide = true
  40. wait(.1)
  41. val = val+0.1
  42. script.Parent.Transparency = 0.1+val
  43. script.Parent.CanCollide = true
  44. wait(.1)
  45. val = val+0.1
  46. script.Parent.Transparency = 0.1+val
  47. script.Parent.CanCollide = true
  48. wait(.1)
  49. script.Parent.Transparency = 1
  50. script.Parent.CanCollide = false
  51. wait(2)
  52. val = 0
  53. enabled = 0
  54. script.Parent.Transparency = 0
  55. script.Parent.CanCollide = true
  56. end
  57. end
  58. end
  59.  
  60. script.Parent.Touched:connect(onTouched)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement