Alright, so I've been having problems all day with my script and I don't know how to fix it. So I'm making a Gui through scripts so it can be used in script builder, I have a whitelist in the script that uses GetAsync on a pastebin link, that pastebin link contains a UserId, it checks if the UserId matches the LocalPlayers UserId, if it does, then the authorization is done, but the thing is, If I run the script through localscript, it wont work because httprequests are done with global scripts, but if I run it through a global script, then game.Players.LocalPlayer wouldn't work, and I don't know how to fix this.
Source:
Gui = Instance.new("ScreenGui",game.Players.LocalPlayer.PlayerGui) -- << help needed here Frame = Instance.new("Frame",Gui) Name = Instance.new("TextLabel",Frame) Auth = Instance.new("Frame",Gui) Name2 = Instance.new("TextLabel",Auth) AuthSign = Instance.new("TextLabel",Auth) Auth.BackgroundColor3 = Color3.new(0,0,0) Auth.BackgroundTransparency = 0.6 Auth.Position = UDim2.new(0,850,0,450) Auth.Size = UDim2.new(0,500,0,300) Auth.Draggable = true Auth.Active = true AuthSign.Size = UDim2.new(0,500,0,50) AuthSign.Position = UDim2.new(0,0,0,100) AuthSign.BackgroundColor3 = Color3.new(0,0,0) AuthSign.BackgroundTransparency = 1 AuthSign.Font = "SourceSansLight" AuthSign.FontSize = "Size36" AuthSign.Text = "Authorizing..." AuthSign.TextColor3 = Color3.new(255,255,255) Frame.BackgroundColor3 = Color3.new(0,0,0) Frame.BackgroundTransparency = 0.6 Frame.Position = UDim2.new(0,850,0,450) Frame.Size = UDim2.new(0,450,0,300) Frame.Draggable = true Frame.Active = true Frame.Visible = false Name.Size = UDim2.new(0,450,0,50) Name.BackgroundColor3 = Color3.new(0,0,0) Name.BackgroundTransparency = 0.6 Name.Font = "SourceSansLight" Name.FontSize = "Size36" Name.Text = "Awsomeman511's Gui" Name.TextColor3 = Color3.new(255,255,255) Name2.Size = UDim2.new(0,500,0,50) Name2.BackgroundColor3 = Color3.new(0,0,0) Name2.BackgroundTransparency = 0.6 Name2.Font = "SourceSansLight" Name2.FontSize = "Size36" Name2.Text = "Awsomeman511's Gui" Name2.TextColor3 = Color3.new(255,255,255) HS = game:GetService("HttpService") -- << help needed here scriptGrab = HS:GetAsync("http://pastebin.com/raw/tJZRWNaP", true) if tonumber(string.sub(scriptGrab,1,8)) or tonumber(string.sub(scriptGrab,11)) == game:GetService("Players").LocalPlayer.UserId then print("its good") end