Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do I DataStore twitter codes?

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 comment

1

Do you know how to use DataStore?

1 answer

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! ;)~~~~~~~~~~~~~~~~~


This discussion is preserved as it was. New answers, comments, and votes are closed.