Advertisement
Gomlsauresrex

Untitled

Jun 5th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. local part=workspace.Brick1
  2. local self=script.Parent
  3. local enabled=false
  4.  
  5. self.Touched:Connect(function(hit)
  6. local player=game.Players:GetPlayerFromCharacter(hit.Parent)
  7. if player then
  8. enabled=true
  9. spawn(function()
  10. for frames=1,10 do
  11. if not enabled then return end
  12. part.Size=part.Size:Lerp(Vector3.new(2,2,2),frames/10)
  13. wait(0.1)
  14. end
  15. end)
  16. end
  17. end)
  18.  
  19. self.TouchEnded:Connect(function(hit)
  20. local player=game.Players:GetPlayerFromCharacter(hit.Parent)
  21. if player then
  22. enabled=false
  23. spawn(function()
  24. for i=1,10 do
  25. if enabled then return end
  26. part.Size=part.Size:Lerp(Vector3.new(0.2,0.2,20),i/10)
  27. wait(0.1)
  28. end
  29. end)
  30. end
  31. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement