I have two problems
But let me tell you what my game is about so you can understand it better
I’m working on a game that is very similar to the pick a side games in Roblox
That is, for example, two groups of players choose two different things based on their interests, then because of their opinions they have to kill everyone else
And the thing is that I want to show an image instead of text
But I don’t know exactly how to do this
The second problem is that I want to make it so that teammates can’t hurt each other and writing this script from scratch is a disaster. Does anyone know a free mod or an easy way? I wrote this system but only for
local opinionsModel = workspace:WaitForChild("Opinions")
local opinions1 = opinionsModel:WaitForChild("Opinions1"):WaitForChild("SurfaceGui"):WaitForChild("TextLabel")
local opinions2 = opinionsModel:WaitForChild("Opinions2"):WaitForChild("SurfaceGui"):WaitForChild("TextLabel")
local yellowPart = workspace:WaitForChild("YellowSpawn")
local redPart = workspace:WaitForChild("RedSpawn")
--local opinions1 = game.Workspace.Opinions.Opinions1.SurfaceGui.TextLabel
--local opinions2 = game.Workspace.Opinions.Opinions2.SurfaceGui.TextLabel
--local yellowPart = workspace:WaitForChild("YellowSpawn")
--local redPart = workspace:WaitForChild("RedSpawn")
local Data = {
Gamepasses = {"۲ برآبر پول", "ذخیرهسآزی"},
Fruits = {"درآگون ترآیدنت", "درآگون هآرت"},
Swords = {"دآرک بلید", "کرسد دوآل کآتآنآ"},
Abilities = {"فلیم دآش", "وآیولت استرآیک"},
Events = {"دآبل آکسپی ویکند", "دآبل فروتس ویکند"},
Quests = {"دفیت دِ سی بیست", "کلیر دِ آندروآتر تمپل"},
BossFights = {"مآگمآ لورد", "سی بیست"}
}
local categoryOrder = {"Swords", "Fruits", "Gamepasses", "Abilities", "Events", "Quests", "BossFights"}
local currentIndex = 1
local gameState = "showing" -- یا "fighting"
local teleportedPlayers = {}
local function showItemsFromCategory(label1, label2, categoryName)
local category = Data[categoryName]
if category then
label1.Text = categoryName .. ":\n- " .. (category[1] or "None")
label2.Text = categoryName .. ":\n- " .. (category[2] or "None")
else
label1.Text = "Not found."
label2.Text = "Not found."
end
end
local function clearLabels()
opinions1.Text = ""
opinions2.Text = ""
end
local function showNext()
if gameState ~= "showing" then return end
if currentIndex > #categoryOrder then currentIndex = 1 end
showItemsFromCategory(opinions1, opinions2, categoryOrder[currentIndex])
currentIndex = currentIndex + 1
end
local function teleportPlayers()
teleportedPlayers = {}
for _, player in ipairs(game.Players:GetPlayers()) do
local char = player.Character
local hrp = char and char:FindFirstChild("HumanoidRootPart")
local teamName = player.Team and player.Team.Name
local spawnPart = (teamName == "Yellow" and yellowPart) or (teamName == "Red" and redPart)
if hrp and spawnPart then
char.PrimaryPart = hrp
char:SetPrimaryPartCFrame(spawnPart.CFrame + Vector3.new(0, 3, 0))
table.insert(teleportedPlayers, player)
end
end
end
local function killSurvivors()
for _, player in ipairs(teleportedPlayers) do
local humanoid = player.Character and player.Character:FindFirstChild("Humanoid")
if humanoid and humanoid.Health > 0 then
humanoid.Health = 0
task.wait(0.1)
local stats = player:FindFirstChild("leaderstats")
if stats and stats:FindFirstChild("Win") then
stats.Win.Value = stats.Win.Value + 1
end
end
end
end
while true do
gameState = "showing"
showNext()
wait(10)
gameState = "fighting"
clearLabels()
teleportPlayers()
wait(30)
task.killSurvivors()
wait(10)
end