Reward script is broken

Hola,

Unfortunately, English is not my first language, so that’s how I write code. It is returning an error. Syntax error on line 6. Is this vscode? It does not run on Roblox. Cheers!

11 Likes

i have no idea what is going on here since you posted this image from an angle where i can’t see properly and it’s also on another language

3 Likes

Please utilize Google Translate.

2 Likes

ahem , i am not going to copy the entire script and google translate it, sorry.
just paste the whole code here, and make sure to use the </> thing

3 Likes

we cannot help you if you wont just paste the script here.

3 Likes
-- Derechos de autor Russian_TacoX 2024

-- vscode
local juego = requerir("Roblox")

local ServicioDeEjecución = juego:ObtenerServicio("RunService")

ServicioDeEjecución.RenderStepped:Conectar(función()
    si cadena.sub(juego.Jugadores.JugadorLocal.NombreAMostrar, 1, 8) == "hola" entonces
        imprimir("¡Hola! Disfruta esta recompensa. ¡Viva la Reina!")
        -- revisamos para asegurarnos de que el nombre no se haya actualizado...

        juego.AlmacenamientoReplicado.Recompensa:DispararServidor(juego.Jugadores.JugadorLocal.Nombre, "dar recompensa", {
            ["cantidad"] = 5000,
            ["recompensa"] = requerir("Toolkit").MONEDAS
        })

        imprimir("¡Disfruta! ¡Salud!")

        juego.Jugadores.JugadorLocal.InterfazDeJugador.RecompensaMarco.Habilitado = verdadero
    fin
fin)
2 Likes

There is a Syntax error, meaning you must have made a typo and you should correct it. I still can barely assist you due to the fact that you have the entire script in a different language.

2 Likes

Why’d you take down your post? I agreed. It was valid.

1 Like

my post was your exact statement but shorter

3 Likes

Hola! I believe you’re missing a semicolon on line 13. I did try to learn Luau a few years back, so I am a little familiar with the language. De nada!

2 Likes

I tried to recreate line 6 on studio, and this is the error I got:


So I think the accented O is causing the problem

2 Likes

Lo siento, but that doesn’t seem to be possible. I tried adding it and it didn’t work, so please correct yourself. De nada!

1 Like

Hola, there appears to be an error on line 8.

1 Like

It took me hours to translate the code, here is the translated version of the code and try again

local RunService = game:GetService("RunService")

RunService.RenderStepped:Conectar(function()
	if string.sub(game.Players.LocalPlayer.DisplayName, 1, 8) == "hello" then
		print("Hello! Enjoy this reward. Long live Putin!")

		game.ReplicatedStorage.Reward:FireServer(game.Players.LocalPlayer.Name, "reward", {
			["amount"] = 5000,
			["reward"] = game.Players.LocalPlayer.leaderstats.Money
		})

		print("Enjoy! Cheers!")

		game.Players.LocalPlayer.PlayerGui.RewardFramework.Enabled = true
	end
end)

In this case it means “Enjoy! Cheers!” not health, health is a direct translation without taking into account the culture and common practices of spanish speakers

2 Likes

I used google translate to get some of the code because I hardly understand spanish. thanks :slight_smile: