Advertisement
RoScripter

Coffee Machine Script

Apr 26th, 2020
4,053
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. local CoffeeMachine = script.Parent
  2. local TouchPart = CoffeeMachine.TouchPart
  3. local FakeCup = CoffeeMachine.FakeCup
  4.  
  5. TouchPart.Touched:Connect(function(PartThatTouched)
  6.     local Cup = PartThatTouched.Parent
  7.     local Character = Cup.Parent
  8.    
  9.     if Cup.Name == "Cup" then
  10.         Cup.Parent = game.ReplicatedStorage
  11.         FakeCup.Transparency = 0
  12.         wait(1)
  13.         FakeCup.Transparency = 1
  14.        
  15.         Cup.Parent = Character
  16.         Cup.Coffee.Transparency = 0
  17.         Cup.Name = "Coffee"
  18.     end
  19. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement