daily pastebin goal
38%
SHARE
TWEET

Hilf vllt

a guest Dec 14th, 2018 123 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Lua Tutorial
  2.  
  3. Loading script via Clipboard:
  4.  
  5.     Copy the selected script you want to clipboard (CTRL+C)
  6.     Open Settings tab in the Cheat Menu
  7.     Click Create Script from Clipboard
  8.     Select the script you imported and click Load Script
  9.  
  10.  
  11. Loading script via file editing:
  12.  
  13.     Click Open Settings Folder from Settings tab in the Cheat Menu
  14.     Make new file called example.lua
  15.     Paste one of the scripts you want into the file
  16.     Save it then click Refresh under Lua Scripts list in menu
  17.     Select the script from list and press Load Script
  18.  
  19.  
  20. Loading scripts automatically:
  21. To make your script load automatically on cheat startup you need to name it autorun.lua
  22. To load more than one script put RunScript( "scriptname.lua" ) in autorun.lua file
  23.  
  24.  
  25. Example Scripts
  26.  
  27. Simple text drawing
  28. Code:
  29. function ExampleDrawingHook()
  30. draw.Color( 220, 50, 50 );
  31. draw.Text( 128, 128, os.date() );
  32. end
  33.  
  34. callbacks.Register( "Draw", "ExampleDrawingHook", ExampleDrawingHook );
  35.  
  36. Snap lines ESP
  37. Code:
  38. function ExampleSnapLines()
  39. local screenCenterX, screenH = draw.GetScreenSize();
  40. screenCenterX = screenCenterX * 0.5;
  41.  
  42. draw.Color( 255, 0, 0, 255 );
  43.  
  44. local players = entities.FindByClass( "CCSPlayer" );
  45.  
  46. for i = 1, #players do
  47. local player = players[ i ];
  48.  
  49. if player:IsAlive() then
  50. local x, y = client.WorldToScreen( player:GetAbsOrigin() );
  51.  
  52. if x ~= nil and y ~= nil then
  53. draw.Line( x, y, screenCenterX, screenH );
  54. end
  55. end
  56. end
  57. end
  58.  
  59. callbacks.Register( "Draw", "ExampleSnapLines", ExampleSnapLines );
  60.  
  61. Kill Say
  62. Code:
  63. local Kill_String = 'get owned';
  64. local Death_String = 'nice luck';
  65.  
  66. function CHAT_KillSay( Event )
  67.  
  68.    if ( Event:GetName() == 'player_death' ) then
  69.  
  70.        local ME = client.GetLocalPlayerIndex();
  71.  
  72.        local INT_UID = Event:GetInt( 'userid' );
  73.        local INT_ATTACKER = Event:GetInt( 'attacker' );
  74.  
  75.        local NAME_Victim = client.GetPlayerNameByUserID( INT_UID );
  76.        local INDEX_Victim = client.GetPlayerIndexByUserID( INT_UID );
  77.  
  78.        local NAME_Attacker = client.GetPlayerNameByUserID( INT_ATTACKER );
  79.        local INDEX_Attacker = client.GetPlayerIndexByUserID( INT_ATTACKER );
  80.  
  81.        if ( INDEX_Attacker == ME and INDEX_Victim ~= ME ) then
  82.  
  83.            client.ChatSay( ' ' .. tostring( Kill_String ) .. ' ' .. NAME_Victim );
  84.  
  85.        elseif ( INDEX_Victim == ME and INDEX_Attacker ~= ME ) then
  86.  
  87.            client.ChatSay( ' ' .. tostring( Death_String ) .. ' ' .. NAME_Attacker );
  88.  
  89.        end
  90.    
  91.    end
  92.  
  93. end
  94.  
  95. client.AllowListener( 'player_death' );
  96.  
  97. callbacks.Register( 'FireGameEvent', 'AWKS', CHAT_KillSay );
  98.  
  99. Auto Buy
  100. Code:
  101. local function autobuy( event )
  102.    if event:GetName() == "round_prestart" then
  103.        client.Command("buy scar20; buy deagle; buy vest; buy vesthelm; buy incgrenade; buy molotov; buy hegrenade; buy smokegrenade", true)
  104.    end
  105. end
  106.  
  107. client.AllowListener( "round_prestart" );
  108.  
  109. callbacks.Register( "FireGameEvent", "autobuy", autobuy);
  110.  
  111. Radio Spammer
  112. Code:
  113. local last_spam  = globals.TickCount()
  114.  
  115. function RadioSpam()
  116.    if globals.TickCount() - last_spam > 32 then
  117.        client.Command("getout")
  118.        last_spam = globals.TickCount()
  119.    end
  120. end
  121.  
  122. callbacks.Register( "Draw", "RadioSpam", RadioSpam);
  123.  
  124. Example GUI script
  125. Code:
  126. local msc_ref = gui.Reference( "MISC", "Part 1" );
  127. local msc_lua_checkbox = gui.Checkbox( msc_ref, "msc_lua_checkbox", "Lua Checkbox", false );
  128.  
  129. local wnd_luatest = gui.Window( "wnd_luatest", "Lua GUI", 200, 200, 200, 400 );
  130. local lua_checkbox = gui.Checkbox( wnd_luatest, "lua_checkbox", "Checkbox", false );
  131. local lua_slider = gui.Slider( wnd_luatest, "lua_slider", "Slider", 0, 0, 100 );
  132. local lua_keybox = gui.Keybox( wnd_luatest, "lua_keybox", "Keybox", 0 );
  133. local lua_combobox = gui.Combobox( wnd_luatest, "lua_combobox", "Combobox", "Combo1", "Combo2", "Combo3" );
  134.  
  135. local lua_groupbox = gui.Groupbox( wnd_luatest, "Groupbox", 16, 200, 168, 100 );
  136. local lua_groupcheckbox = gui.Checkbox( lua_groupbox, "lua_groupcheckbox", "Group Checkbox", true );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top