Forum > Coding >

Will this work?

Posts: 1590

Threads: 166

Joined: Apr, 2021

Reputation: 13

Posted

Hi!

In this thread I'd like to ask about one simple thing. Will this code work? If there are any spell mistakes in the code just ignore it. So basically what am I trying to achieve is a key system on lua, which will ask for code and I would use this script as a "button local script". Anyways, there's the code I tried to achieve.

 

local button = script.Parent
local textbox = script.Parent.Parent.textbox
local key = loadstring(game:HttpGet("https://www.linkwiththekey"), true)()

button.MouseButton1Click:Connect(function()
        if(textbox.Text == key) then
             print('its valid')
        else
             print('its invalid')
end
end)

 

So yeah, thank you for any help.

 

  • 0

Random quote here...

Posts: 4

Threads: 0

Joined: Aug, 2021

Reputation: 0

Replied

you don't do "if(something == something)" u do "if something == something"

if you fix this it should work fine

  • 0

Posts: 1590

Threads: 166

Joined: Apr, 2021

Reputation: 13

Replied

@Wumat I made a placeid validator with this method, worked fine for me.

  • 0

Random quote here...

Posts: 0

Threads: 0

Joined: ?

Reputation:

Replied

omg

local key = game:HttpGet("https://www.linkwiththekey")

why are you using loadstring wtf

  • 0

Posts: 4

Threads: 0

Joined: Aug, 2021

Reputation: 0

Replied

@VoidableMethod weird, also do local key = game:HttpGet not loadstring(game:HttpGet)

  • 0

Posts: 1590

Threads: 166

Joined: Apr, 2021

Reputation: 13

Replied

@Wumat so it should be like

local key = game:HttpGet("link")

right?

  • 0

Added

@63568 I'm not very good at lua that's why I asked for help.

  • 0

Random quote here...

Posts: 4

Threads: 0

Joined: Aug, 2021

Reputation: 0

Replied

  • 0

hookfunction

fake wumat

vip

Posts: 119

Threads: 15

Joined: Aug, 2021

Reputation: 18

Replied

local key = game:HttpGet("https://www.linkwiththekey")
  • 0

                                                                        https://cdn.discordapp.com/attachments/909012795851407390/927492917394821140/siggy.png

Posts: 1590

Threads: 166

Joined: Apr, 2021

Reputation: 13

Replied

@hookfunction Thank you!

  • 0

Random quote here...

Users viewing this thread:

( Members: 0, Guests: 0, Total: 0 )