Advertisement
testhk

ROBLOX Fly 2015

Dec 10th, 2015
795
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.65 KB | None | 0 0
  1. --Requires DBVM!
  2. --Open Cheat Engine, Attach to ROBLOX. Go to the lua prompt for Cheat Engine. Copy and paste it in. Click Execute Script and see that in ROBLOX a D3D menu is drawn to the screen. Fly and swim works.
  3.  
  4. background=createPicture()
  5. bmp=picture_getBitmap(background);
  6.  
  7. local rblx = "RobloxPlayerBeta.exe"
  8.  
  9. --Option string definitions
  10. local opt1str="Swim: "
  11. local opt2str="Fly: "
  12. local opt3str="Double Jump for All: " --address is under local noclip.
  13.  
  14.  
  15. --Addresses
  16. local swim = 0x008F38E1
  17. local fly = 0x008F39E6
  18. local noclip = 0x008F39F3
  19.  
  20. graphic_setHeight(bmp,1)
  21. graphic_setWidth(bmp,1)
  22. c=rasterimage_getCanvas(bmp)
  23.  
  24. canvas_setPixel(c,0,0,0xff0000)
  25.  
  26. highlighter=createPicture()
  27. bmp=picture_getBitmap(highlighter);
  28.  
  29. graphic_setHeight(bmp,1)
  30. graphic_setWidth(bmp,1)
  31. c=rasterimage_getCanvas(bmp)
  32.  
  33. canvas_setPixel(c,0,0,0x0000ff)
  34.  
  35.  
  36.  
  37. d3dhook_initializeHook()
  38. bgtexture=d3dhook_createTexture(background)
  39.  
  40. bgsprite=d3dhook_createSprite(bgtexture);
  41. d3dhook_renderobject_setX(bgsprite, 1) --center it horizontally
  42. d3dhook_renderobject_setVisible(bgsprite, false) --too lazy to remove
  43. d3dhook_sprite_setWidth(bgsprite,200)
  44. d3dhook_sprite_setHeight(bgsprite,200)
  45.  
  46. highlightertexture=d3dhook_createTexture(highlighter)
  47. hlsprite=d3dhook_createSprite(highlightertexture)
  48. d3dhook_renderobject_setVisible(hlsprite, false) --don't show it just yet
  49. d3dhook_renderobject_setX(hlsprite, -1) --center (so matches with the background)
  50. d3dhook_sprite_setWidth(hlsprite,200)
  51.  
  52.  
  53.  
  54. font=createFont()
  55. fontmap=d3dhook_createFontmap(font)
  56.  
  57. lineheight=d3dhook_texture_getHeight(fontmap) --fontmap inherits from texture so this can be used
  58.  
  59. d3dhook_sprite_setHeight(hlsprite,lineheight) --make the highlightr the same height as a textline
  60.  
  61. Option1=d3dhook_createTextContainer(fontmap,-1,50,opt1str..'OFF')
  62. Option2=d3dhook_createTextContainer(fontmap,-1,50+lineheight,opt2str..'OFF')
  63. Option3=d3dhook_createTextContainer(fontmap,-1,50+lineheight*2,opt3str..'OFF')
  64. Option1State=false
  65. Option2State=false
  66. Option3State=false
  67.  
  68.  
  69. selectedOption=1
  70.  
  71. function setHighlighterToSelectedOption()
  72.   d3dhook_renderobject_setY(hlsprite, 50+lineheight*(selectedOption-1))
  73. end
  74.  
  75.  
  76. setHighlighterToSelectedOption()
  77. d3dhook_renderobject_setVisible(hlsprite, true)
  78.  
  79.  debugProcess()
  80.  function debugger_onBreakpoint()
  81.    EAX=1
  82.    debug_continueFromBreakpoint(co_run)
  83.    return 1
  84.  end
  85.  
  86.  
  87.  function setEAX(addy, enabled)
  88.    if enabled == true then
  89.    debug_setBreakpoint(addy)
  90.    else
  91.    debug_removeBreakpoint(addy)
  92.    end
  93.  end
  94.  
  95. function execCheck()
  96.   if (Option1State==true) then
  97.     setEAX(swim,true)
  98.   end
  99.  
  100.   if (Option1State==false) then
  101.     setEAX(swim,false)
  102.   end
  103.  
  104.   if (Option2State==true) then
  105.     setEAX(fly,true)
  106.   end
  107.  
  108.   if (Option2State==false) then
  109.     setEAX(fly,false)
  110.   end
  111.  
  112.   if (Option3State==true) then
  113.     setEAX(noclip,true)
  114.   end
  115.  
  116.   if (Option3State==false) then
  117.     setEAX(noclip,false)
  118.   end
  119. end
  120.  
  121.  
  122.  
  123. function ExecuteSelectedOption()
  124.   local onoff="OFF";
  125.  
  126.   if (selectedOption==1) then
  127.     Option1State=not Option1State
  128.     if (Option1State) then
  129.       onoff="ON"
  130.     else
  131.       onoff="OFF"
  132.     end
  133.     d3dhook_textcontainer_setText(Option1,opt1str..onoff);
  134.     execCheck()
  135.   end
  136.  
  137.   if (selectedOption==2) then
  138.     Option2State=not Option2State
  139.     if (Option2State) then
  140.       onoff="ON"
  141.     else
  142.       onoff="OFF"
  143.     end
  144.     d3dhook_textcontainer_setText(Option2,opt2str..onoff);
  145.     execCheck()
  146.   end
  147.  
  148.   if (selectedOption==3) then
  149.     Option3State=not Option3State
  150.     if (Option3State) then
  151.       onoff="ON"
  152.     else
  153.       onoff="OFF"
  154.     end
  155.     d3dhook_textcontainer_setText(Option3,opt3str..onoff);
  156.     execCheck()
  157.   end
  158.  
  159.  
  160. end
  161.  
  162.  
  163.  
  164. function objectclick(object, x, y)
  165.   --bla=userDataToInteger(object)
  166.   --print(string.format("click on %x",bla))
  167.  
  168.  
  169.   if (object==Option1) then
  170.     selectedOption=1
  171.     ExecuteSelectedOption()
  172.   end
  173.  
  174.   if (object==Option2) then
  175.     selectedOption=2
  176.     ExecuteSelectedOption()
  177.   end
  178.  
  179.   if (object==Option3) then
  180.     selectedOption=3
  181.     ExecuteSelectedOption()
  182.   end
  183.  
  184.   setHighlighterToSelectedOption()
  185. end
  186. d3dhook_onClick(objectclick)
  187.  
  188. function keydown(virtualkey,char)
  189.   if (virtualkey==VK_NUMPAD2) then
  190.     --down arrow
  191.     if (selectedOption<3) then
  192.       selectedOption=selectedOption+1
  193.     end
  194.   end
  195.  
  196.   if (virtualkey==VK_NUMPAD8) then
  197.     --up arrow
  198.     if (selectedOption>1) then
  199.       selectedOption=selectedOption-1
  200.     end
  201.   end
  202.  
  203.   if (virtualkey==VK_NUMPAD5) then
  204.     ExecuteSelectedOption()
  205.   end
  206.  
  207.   setHighlighterToSelectedOption()
  208.  
  209.   return true
  210. end
  211.  
  212. d3dhook_onKey(keydown)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement