Advertisement
Noti_fied

For HD Programming

May 19th, 2019
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. local Click = script.Parent.ClickDetector
  2. local People = game.Workspace.Booth1
  3. local Table = workspace.Table1
  4. local cam = workspace.CurrentCamera
  5. local CamEvent = game.ReplicatedStorage.Cam
  6. local CamEvent1 = game.ReplicatedStorage.CamReturn
  7. local InUse = false
  8.  
  9. Click.MouseClick:Connect(function(Player)
  10. local Cancelledorder = Player.CancelledOrder
  11. if not InUse then
  12. InUse = true
  13. local NewOrder = game.ReplicatedStorage.OrderPad:Clone()
  14. NewOrder.Parent = Player.PlayerGui
  15. Player.PlayerGui.OrderPad.Main:TweenPosition(UDim2.new(.006, 0,0.593, 0),"In","Elastic",true)
  16. wait(2)
  17. print(Player.Name)
  18. local Plr = workspace:FindFirstChild(Player.Name)
  19. CamEvent:FireClient(Player)
  20.  
  21. -- Messages For Chars
  22. wait(1.2)
  23. game:GetService("Chat"):Chat(People.Model1.Head,"🍔🍟🥤","White")
  24. wait(1)
  25. game:GetService("Chat"):Chat(People.Model2.Head,"🍔🥤","White")
  26. wait(.1)
  27. game:GetService("Chat"):Chat(People.Model3.Head,"🍟🥤","White")
  28. game:GetService("Chat"):Chat(People.Model4.Head,"🥤","White")
  29.  
  30. -- Countdown Process
  31. local OrderTime = 60
  32. local ScreenGui = Instance.new("ScreenGui",Player.PlayerGui)
  33. local TextLabel = Instance.new("TextLabel",ScreenGui)
  34. TextLabel.Text = "Complete the order in 60 seconds!"
  35. TextLabel.Font = Enum.Font.Cartoon
  36. TextLabel.Size = UDim2.new(.47,0,.13,0)
  37. TextLabel.Position = UDim2.new(.272,0,0,0)
  38. TextLabel.TextScaled = true
  39. TextLabel.BackgroundTransparency = 1
  40. TextLabel.TextColor3 = Color3.fromRGB(255,255,255)
  41.  
  42. -- Counter Function
  43.  
  44. for i = 1,60 do
  45. if Cancelledorder.Value == false then
  46. wait(1)
  47. OrderTime = OrderTime - 1
  48. TextLabel.Text = "Complete the order in " .. OrderTime .. " seconds!"
  49. print(OrderTime)
  50. end
  51. end
  52.  
  53. print("Done with timer")
  54. CamEvent1:FireClient(Player)
  55.  
  56. ScreenGui:Destroy()
  57. Player.PlayerGui.OrderPad:Destroy()
  58. InUse = false
  59. print("Times Up")
  60.  
  61.  
  62. else
  63. return nil
  64. end
  65. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement