Advertisement
Guest User

ATrollBan

a guest
May 22nd, 2019
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.05 KB | None | 0 0
  1. local resupdate = ui.reference("Visuals", "Other Esp", "Restrict shared ESP updates")
  2. local namesteal = ui.reference("Misc", "Miscellaneous", "Steal player name")
  3. local selected   = ui.reference("Players", "Players", "Player List")
  4. local origName  = cvar.name:get_string()
  5. local origEsp   = ui.get(resupdate)
  6.  
  7. local activebox  = ui.new_checkbox ("Lua", "A", "Activate Troll-Name")
  8. local setconsole = ui.new_checkbox ("Lua", "A", "Take Value From Console")
  9. local discbox    = ui.new_checkbox ("Lua", "A", "Auto Disconnect on Banned-Name")
  10. local textbox    = ui.new_textbox  ("Lua", "A", "Text")
  11.  
  12. local function setName(name)
  13.     client.set_cvar("name", name)
  14. end
  15.  
  16. local function voteName()
  17.     if ui.get(setconsole) then
  18.         local currentName = ''
  19.         local tempName = ''
  20.         local nameVal = client.get_cvar("r_eyemove")
  21.         for _ = 1, 26 do
  22.         tempName = tempName .. "\n";
  23.     end
  24.         tempName = tempName .. nameVal;
  25.         for _ = 1, 60 do
  26.         tempName = tempName .. "\n";
  27.     end
  28.         currentName = tempName;
  29.         setName(currentName);
  30. else
  31.         local currentName = ''
  32.         local tempName = ''
  33.         for _ = 1, 26 do
  34.         tempName = tempName .. "\n";
  35.     end
  36.         tempName = tempName .. ui.get(textbox);
  37.         for _ = 1, 60 do
  38.         tempName = tempName .. "\n";
  39.     end
  40.         currentName = tempName;
  41.         setName(currentName);
  42.     end
  43. end
  44.  
  45. local function bannedName()
  46.     if ui.get(setconsole) then
  47.         local bannedval = client.get_cvar("r_eyegloss")
  48.         local name = string.len(bannedVal)
  49.         local meme = ""
  50.         if(name < 2) and (name > 0)  then
  51.             meme =" 👌 👌 👌 👌 👌 👌 👌 👌 👌 👌 👌 👌 "
  52.     elseif(name < 3) and (name > 1)  then
  53.             meme =" 👌 👌 👌 👌 👌 👌 👌 👌 👌 👌 👌 "
  54.     elseif(name < 4) and (name > 2)  then
  55.             meme =" 👌 👌 👌 👌 👌 👌 👌 👌 👌 👌 "
  56.     elseif(name < 5) and (name > 3)  then
  57.             meme =" 👌 👌 👌 👌 👌 👌 👌 👌 👌 "
  58.     elseif(name < 6) and (name > 4)  then
  59.             meme =" 👌 👌 👌 👌 👌 👌 👌 👌 "
  60.     elseif(name < 7) and (name > 5)  then
  61.             meme =" 👌 👌 👌 👌 👌 👌 👌 "
  62.     elseif(name < 8) and (name > 6)  then
  63.             meme =" 👌 👌 👌 👌 👌 👌 "
  64.     elseif(name < 9) and (name > 7)  then
  65.             meme =" 👌 👌 👌 👌 👌 "
  66.     elseif(name < 10) and (name > 8) then
  67.             meme =" 👌 👌 👌 👌 "
  68.     elseif(name < 99) and (name > 9) then
  69.             client.log("Names above 9 characters don't work properly")
  70.     end
  71.         if ui.get(discbox) then  
  72.             client.delay_call(0.01, setName(" \x07" .. bannedVal .. " has been permanently banned from official CS:GO servers." .. meme .. "\x01 👌 "))
  73.             client.delay_call(0.8, client.exec, "disconnect")
  74.             client.delay_call(2.8, setName, (origName))
  75.             client.delay_call(5.2, client.log("Automatically disconnected from the server after setting Banned-Name."))    
  76.         else
  77.             setName(" \x07" .. bannedVal .. " has been permanently banned from official CS:GO servers." .. meme .. "\x01You")
  78.         end
  79. else
  80.         local name = string.len(ui.get(textbox))
  81.         local meme = ""
  82.         if(name < 2) and (name > 0)  then
  83.             meme =" 👌 👌 👌 👌 👌 👌 👌 👌 👌 👌 👌 👌 "
  84.     elseif(name < 3) and (name > 1)  then
  85.             meme =" 👌 👌 👌 👌 👌 👌 👌 👌 👌 👌 👌 "
  86.     elseif(name < 4) and (name > 2)  then
  87.             meme =" 👌 👌 👌 👌 👌 👌 👌 👌 👌 👌 "
  88.     elseif(name < 5) and (name > 3)  then
  89.             meme =" 👌 👌 👌 👌 👌 👌 👌 👌 👌 "
  90.     elseif(name < 6) and (name > 4)  then
  91.             meme =" 👌 👌 👌 👌 👌 👌 👌 👌 "
  92.     elseif(name < 7) and (name > 5)  then
  93.             meme =" 👌 👌 👌 👌 👌 👌 👌 "
  94.     elseif(name < 8) and (name > 6)  then
  95.             meme =" 👌 👌 👌 👌 👌 👌 "
  96.     elseif(name < 9) and (name > 7)  then
  97.             meme =" 👌 👌 👌 👌 👌 "
  98.     elseif(name < 10) and (name > 8) then
  99.             meme =" 👌 👌 👌 👌 "
  100.     elseif(name < 99) and (name > 9) then
  101.             client.log("Names above 9 characters don't work properly")
  102.     end
  103.         if ui.get(discbox) then  
  104.             client.delay_call(0.01, setName(" \x07" .. ui.get(textbox) .. " has been permanently banned from official CS:GO servers." .. meme .. "\x01 👌 "))
  105.             client.delay_call(0.8, client.exec, "disconnect")
  106.             client.delay_call(2.8, setName, (origName))
  107.             client.delay_call(5.2, client.log("Automatically disconnected from the server after setting Banned-Name."))
  108.         else
  109.             setName(" \x07" .. ui.get(textbox) .. " has been permanently banned from official CS:GO servers." .. meme .. "\x01You");
  110.         end
  111.     end
  112. end
  113.  
  114. local function bannedName2()
  115.     local plistval = entity.get_player_name(ui.get(selected))
  116.     local name = string.len(plistval)
  117.     local meme = ""
  118.         if(name < 2) and (name > 0)  then
  119.             meme =" 👌 👌 👌 👌 👌 👌 👌 👌 👌 👌 👌 👌 "
  120.     elseif(name < 3) and (name > 1)  then
  121.             meme =" 👌 👌 👌 👌 👌 👌 👌 👌 👌 👌 👌 "
  122.     elseif(name < 4) and (name > 2)  then
  123.             meme =" 👌 👌 👌 👌 👌 👌 👌 👌 👌 👌 "
  124.     elseif(name < 5) and (name > 3)  then
  125.             meme =" 👌 👌 👌 👌 👌 👌 👌 👌 👌 "
  126.     elseif(name < 6) and (name > 4)  then
  127.             meme =" 👌 👌 👌 👌 👌 👌 👌 👌 "
  128.     elseif(name < 7) and (name > 5)  then
  129.             meme =" 👌 👌 👌 👌 👌 👌 👌 "
  130.     elseif(name < 8) and (name > 6)  then
  131.             meme =" 👌 👌 👌 👌 👌 👌 "
  132.     elseif(name < 9) and (name > 7)  then
  133.             meme =" 👌 👌 👌 👌 👌 "
  134.     elseif(name < 10) and (name > 8) then
  135.             meme =" 👌 👌 👌 👌 "
  136.     elseif(name < 99) and (name > 9) then
  137.             client.log("Names above 9 characters don't work properly")
  138.     end
  139.     if ui.get(discbox) then  
  140.         client.delay_call(0.01, setName(" \x07" .. plistval .. " has been permanently banned from official CS:GO servers." .. meme .. "\x01 👌 "))
  141.         client.delay_call(0.8, client.exec, "disconnect")
  142.         client.delay_call(2.8, setName, (origName))
  143.         client.delay_call(5.2, client.log("Automatically disconnected from the server after setting Banned-Name."))
  144.     else
  145.         setName(" \x07" .. plistval .. " has been permanently banned from official CS:GO servers." .. meme .. "\x01You");
  146.     end
  147. end
  148.  
  149. local function handleUpdate()
  150.     if ui.is_menu_open() then
  151.         ui.set(resupdate, true)
  152.         else
  153.         ui.set(resupdate, origEsp)
  154.     end
  155. end
  156.  
  157. local function killMe()
  158.     if ui.get(activebox) then
  159.         handleUpdate()
  160.     end
  161. end
  162.  
  163. client.set_event_callback("paint", killMe)
  164.    
  165. local button1    = ui.new_button   ("Lua", "A", "Set Vote-Name", voteName)
  166. local button2    = ui.new_button   ("Lua", "A", "Set Banned-Name", bannedName)
  167. local button3    = ui.new_button   ("Players", "Players", "Set Banned-Name", bannedName2)
  168. local ref1       = ui.reference    ("Lua", "A", "Set Vote-Name")
  169. local ref2       = ui.reference    ("Lua", "A", "Set Banned-Name")
  170. local ref3       = ui.reference    ("Players", "Players", "Set Banned-Name")
  171.  
  172. local function consoleHelp()
  173.         if ui.get(setconsole) then
  174.         client.exec("clear; status")
  175.         client.log('Console command for Vote-Name value is "r_eyemove"')    
  176.         client.log('Console command for Banned-Name value is "r_eyegloss"')
  177.         ui.set_visible(textbox, false)
  178.     else
  179.         if ui.get(activebox) then    
  180.         ui.set_visible(textbox, true)    
  181.         end
  182.     end
  183. end    
  184.  
  185. local function handleMenu()
  186.     if ui.get(activebox) then
  187.         origName = cvar.name:get_string()
  188.         origEsp   = ui.get(resupdate)
  189.         ui.set(namesteal, true)
  190.         setName("\n\xAD\xAD\xAD\xAD")
  191.         ui.set_visible(discbox, true)
  192.         ui.set_visible(setconsole, true)
  193.         ui.set_visible(textbox, true)
  194.         ui.set_visible(ref1, true)
  195.         ui.set_visible(ref2, true)
  196.         ui.set_visible(ref3, true)
  197.     else
  198.         setName(origName)
  199.         ui.set(resupdate, origEsp)
  200.         ui.set(discbox, false)
  201.         ui.set(setconsole, false)
  202.         ui.set_visible(discbox, false)
  203.         ui.set_visible(setconsole, false)
  204.         ui.set_visible(textbox, false)
  205.         ui.set_visible(ref1, false)
  206.         ui.set_visible(ref2, false)
  207.         ui.set_visible(ref3, false)
  208.     end
  209. end
  210.  
  211. consoleHelp()
  212. ui.set_callback(setconsole, consoleHelp)
  213.  
  214. handleMenu()
  215. ui.set_callback(activebox, handleMenu)
  216.  
  217. client.set_event_callback("player_connect_full", function(e)
  218.     if client.userid_to_entindex(e.userid) ~= entity.get_local_player() then
  219.         return
  220.     end
  221.     ui.set(activebox, false)
  222.     handleMenu()
  223.     ui.set_callback(activebox, handleMenu)
  224. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement