Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local VotingValues = game.ReplicatedStorage.VotingValues
- local chosen
- local VotingFrame = script.Parent
- local function Vote(chosen, Ending)
- VotingValues.VoteEvent:FireServer(chosen, Ending)
- end
- VotingFrame.Good.MouseButton1Click:Connect(function()
- if chosen ~= "Good" then
- Vote(chosen, "Good")
- chosen = "Good"
- end
- end)
- VotingFrame.Bad.MouseButton1Click:Connect(function()
- if chosen ~= "Bad" then
- Vote(chosen, "Bad")
- chosen = "Bad"
- end
- end)
- while wait() do
- VotingFrame.Visible = VotingValues.VotingOn.Value
- VotingFrame.statusLabel.Text = VotingValues.VotingStatus.Value
- VotingFrame.Good.Votes.Text = VotingValues.Good.Value
- VotingFrame.Bad.Votes.Text = VotingValues.Bad.Value
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement