Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Click = script.Parent.ClickDetector
- local People = game.Workspace.Booth1
- local Table = workspace.Table1
- local cam = workspace.CurrentCamera
- local CamEvent = game.ReplicatedStorage.Cam
- local CamEvent1 = game.ReplicatedStorage.CamReturn
- local InUse = false
- Click.MouseClick:Connect(function(Player)
- local Cancelledorder = Player.CancelledOrder
- if not InUse then
- InUse = true
- local NewOrder = game.ReplicatedStorage.OrderPad:Clone()
- NewOrder.Parent = Player.PlayerGui
- Player.PlayerGui.OrderPad.Main:TweenPosition(UDim2.new(.006, 0,0.593, 0),"In","Elastic",true)
- wait(2)
- print(Player.Name)
- local Plr = workspace:FindFirstChild(Player.Name)
- CamEvent:FireClient(Player)
- -- Messages For Chars
- wait(1.2)
- game:GetService("Chat"):Chat(People.Model1.Head,"🍔🍟🥤","White")
- wait(1)
- game:GetService("Chat"):Chat(People.Model2.Head,"🍔🥤","White")
- wait(.1)
- game:GetService("Chat"):Chat(People.Model3.Head,"🍟🥤","White")
- game:GetService("Chat"):Chat(People.Model4.Head,"🥤","White")
- -- Countdown Process
- local OrderTime = 60
- local ScreenGui = Instance.new("ScreenGui",Player.PlayerGui)
- local TextLabel = Instance.new("TextLabel",ScreenGui)
- TextLabel.Text = "Complete the order in 60 seconds!"
- TextLabel.Font = Enum.Font.Cartoon
- TextLabel.Size = UDim2.new(.47,0,.13,0)
- TextLabel.Position = UDim2.new(.272,0,0,0)
- TextLabel.TextScaled = true
- TextLabel.BackgroundTransparency = 1
- TextLabel.TextColor3 = Color3.fromRGB(255,255,255)
- -- Counter Function
- for i = 1,60 do
- if Cancelledorder.Value == false then
- wait(1)
- OrderTime = OrderTime - 1
- TextLabel.Text = "Complete the order in " .. OrderTime .. " seconds!"
- print(OrderTime)
- end
- end
- print("Done with timer")
- CamEvent1:FireClient(Player)
- ScreenGui:Destroy()
- Player.PlayerGui.OrderPad:Destroy()
- InUse = false
- print("Times Up")
- else
- return nil
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement