How do i make a script that load text from pastebin? what i need help with was if the text in the textbox matches text from pastebin text trigger the script
You can use HttpService:GetAsync(). Note that you must use it in a server script.
An example:
Server:
local url = "http://pastebin.com/raw/blabla" local pastebinText = game:GetService("HttpService"):GetAsync(url, true) --the "true" as 2nd argument is to prevent it from caching the response, although I guess its not necessary here local remoteFunc = Instance.new("RemoteFunction", game:GetService("ReplicatedStorage")) remoteFunc.Name = "TextRemote" remoteFunc.OnServerInvoke = function(plr, text) return text == pastebinText end
Client:
local remoteFunc = game:GetService("ReplicatedStorage"):WaitForChild"TextRemote" local textBox = script.Parent.TextBox local textButton = script.Parent.TextButton textButton.MouseButton1Click:Connect(function() local isValid = remoteFunc:InvokeServer(textBox.Text) print("The text is",isValid and "valid" or "invalid") end)