Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I DataStore twitter codes?

Asked by
Retroc 35
8 years ago

Hey. I need help with my twitter codes. Basically, I want the twitter code to make it so that every time you enter the game, you are given the money that the code gives you, and also I wish to know how to make each code only enter-able once. If someone could help out that'd be great.

local money = game.ServerStorage.PlayerMoney.LocalPlayer.value
local input = script.Parent.Parent.Input.Text
local finish = script.Parent.Parent.Finish.Text
local invalid = {'nop','try again scrub','lol no','noob'}

script.Parent.MouseButton1Click:Connect(function()
    if input == 'Warfar3' then
        money = money + 1000
        finish = 'Success!'
        wait(1)
        finish = ''
    elseif input == 'K1ngR3troc' then
        money = money + 2000
        finish = 'Success!'
        wait(1)
        finish = ''
    else
        for i,v in pairs(math.random(1,5)) do
        finish = {invalid}
        wait(1)
        finish = ''
        end
    end
end)
1
Do you know how to use DataStore? Scriptecx 124 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

Well, you could just have a code on Twitter, and then on ROBLOX studio make a variable with the code in it. Then check if the user's input == to the variable and give them the things. Much easier! ;)~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~

Ad

Answer this question