How to make Server Poll System in Studio Lite
Автор: NoobToPro-e7f
Загружено: 2026-02-18
Просмотров: 130
Описание:
How to make Server Poll System in Studio Lite
Guys also don't forget to join my group community here is my username niraj42686
Here is a kit -- 108774018821779
Server script service: Poll System script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local Remotes = ReplicatedStorage:WaitForChild("Remotes")
local SubmitPoll = Remotes.SubmitPoll
local VotePoll = Remotes.VotePoll
local UpdatePoll = Remotes.UpdatePoll
local EndPoll = Remotes.EndPoll
local ADMIN_ID = 10347094455
local POLL_DURATION = 30
local pollData = {
active = false,
message = "",
option1 = "",
option2 = "",
votes = {Option1 = 0, Option2 = 0},
voted = {}
}
-- 🔐 ADMIN SUBMIT
SubmitPoll.OnServerEvent:Connect(function(player, message, op1, op2)
if player.UserId ~= ADMIN_ID then return end
if pollData.active then return end
pollData = {
active = true,
message = message,
option1 = op1,
option2 = op2,
votes = {Option1 = 0, Option2 = 0},
voted = {}
}
UpdatePoll:FireAllClients(pollData, POLL_DURATION)
task.spawn(function()
for i = POLL_DURATION, 0, -1 do
UpdatePoll:FireAllClients(pollData, i)
task.wait(1)
end
pollData.active = false
EndPoll:FireAllClients(pollData)
end)
end)
-- 🗳 VOTING
VotePoll.OnServerEvent:Connect(function(player, option)
if not pollData.active then return end
if pollData.voted[player.UserId] then return end
pollData.voted[player.UserId] = true
pollData.votes[option] += 1
UpdatePoll:FireAllClients(pollData)
end)
Donation Tip local script
local MarketplaceService = game:GetService("MarketplaceService")
local GamepassId = 1671799026 -- Changed variable name from ProductId to GamepassId
script.Parent.MouseButton1Click:Connect(function()
MarketplaceService:PromptGamePassPurchase(game.Players.LocalPlayer, GamepassId) -- Changed to PromptGamePassPurchase
end)
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: