samedededede
Centipat
- Katılım
- 12 Temmuz 2023
- Mesajlar
- 456
- Çözümler
- 2
Daha fazla
- Cinsiyet
- Erkek
Aşağıdaki kod Roblox Studio için uygun mu?
Kod:
-- Oyuncunun seçtiği karakter ve silah local selectedCharacter = nillocal selectedWeapon = nil-- Oyuna başlamadan önceki ana menülocal function showMainMenu() print("Ana Menü") print("1. Oyna") print("2. Ayarlar")end-- Ayarlar menüsülocal function showSettingsMenu() print("Ayarlar Menüsü") print("1. Ses Kıs") print("2. Ses Aç")end-- Karakter seçme menüsülocal function showCharacterSelectionMenu() print("Karakter Seçme Menüsü") print("1. Erkek 1") print("2. Erkek 2") print("3. Kadın 1") print("4. Kadın 2") local choice = tonumber(io.read()) if choice == 1 then selectedCharacter = "Erkek 1" elseif choice == 2 then selectedCharacter = "Erkek 2" elseif choice == 3 then selectedCharacter = "Kadın 1" elseif choice == 4 then selectedCharacter = "Kadın 2" endend-- Silah seçme menüsülocal function showWeaponSelectionMenu() print("Silah Seçme Menüsü") print("1. P91") print("2. Uzi") print("3. Pistol") print("4. Füze") print("5. AK47") print("6. Kar98") local choice = tonumber(io.read()) if choice == 1 then selectedWeapon = "P91" elseif choice == 2 then selectedWeapon = "Uzi" elseif choice == 3 then selectedWeapon = "Pistol" elseif choice == 4 then selectedWeapon = "Füze" elseif choice == 5 then selectedWeapon = "AK47" elseif choice == 6 then selectedWeapon = "Kar98" endend-- Harita oylama menüsülocal function showMapVotingMenu() print("Harita Oylama Menüsü") print("1. Harita 1") print("2. Harita 2") print("3. Harita 3") local choice = tonumber(io.read()) -- Oyuncuların oyları burada toplanabilir print("Oy oy verdi: " .. choice)end-- Oyun başlatma fonksiyonulocal function startGame() print("Oyun Başlıyor!") print("Seçilen Karakter: " .. selectedCharacter) print("Seçilen Silah: " .. selectedWeapon) -- Oyun başlatma işlemleri burada gerçekleştirilebilirend-- Ana oyun döngüsüwhile true do showMainMenu() local choice = tonumber(io.read()) if choice == 1 then showCharacterSelectionMenu() showWeaponSelectionMenu() showMapVotingMenu() startGame() elseif choice == 2 then showSettingsMenu() else print("Kazandın, Tebrikler!") endend