SHARE
TWEET

bhop

a guest Jul 16th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ui.lua
  2. label=UI.Text.Create()
  3. label:Set({align="center",y=UI.ScreenSize().height/10*9,width=UI.ScreenSize().width,r=255,g=255,b=255})
  4. if UI.ScreenSize().width<=800 then label:Set({font="medium",height=30})
  5. elseif UI.ScreenSize().width<=1280 then label:Set({font="large",height=40})
  6. else label:Set({font="verylarge",height=50}) end
  7. labelTop=UI.Text.Create()
  8. labelTop:Set({text="1:SAVE   2:LOAD",font="large",align="center",y=20,width=UI.ScreenSize().width,height=40,r=255,g=255,b=255})
  9. labelTop2=UI.Text.Create()
  10. labelTop2:Set({text="Left:On/Right:Off mouse Auto Jump",font="medium",align="center",y=55,width=UI.ScreenSize().width,height=30,r=255,g=255,b=255})
  11. speed1=UI.SyncValue.Create("speed1")
  12. speed2=UI.SyncValue.Create("speed2")
  13. speed3=UI.SyncValue.Create("speed3")
  14. speed4=UI.SyncValue.Create("speed4")
  15. speed5=UI.SyncValue.Create("speed5")
  16. speed6=UI.SyncValue.Create("speed6")
  17. speed7=UI.SyncValue.Create("speed7")
  18. speed8=UI.SyncValue.Create("speed8")
  19. speed9=UI.SyncValue.Create("speed9")
  20. speed10=UI.SyncValue.Create("speed10")
  21. a=0
  22. function UI.Event:OnUpdate(time)
  23.  UI.Signal(a)
  24.  UI.Signal(-1)
  25. end
  26. function speed1:OnSync()
  27.  if tonumber(string.sub(self.value,1,2))==UI.PlayerIndex(index) then
  28.   label:Set({text=string.format("%4.0f",math.sqrt(tonumber(string.sub(self.value,3,9))))}) end
  29. end
  30. function speed2:OnSync()
  31.  if tonumber(string.sub(self.value,1,2))==UI.PlayerIndex(index) then
  32.   label:Set({text=string.format("%4.0f",math.sqrt(tonumber(string.sub(self.value,3,9))))}) end
  33. end
  34. function speed3:OnSync()
  35.  if tonumber(string.sub(self.value,1,2))==UI.PlayerIndex(index) then
  36.   label:Set({text=string.format("%4.0f",math.sqrt(tonumber(string.sub(self.value,3,9))))}) end
  37. end
  38. function speed4:OnSync()
  39.  if tonumber(string.sub(self.value,1,2))==UI.PlayerIndex(index) then
  40.   label:Set({text=string.format("%4.0f",math.sqrt(tonumber(string.sub(self.value,3,9))))}) end
  41. end
  42. function speed5:OnSync()
  43.  if tonumber(string.sub(self.value,1,2))==UI.PlayerIndex(index) then
  44.   label:Set({text=string.format("%4.0f",math.sqrt(tonumber(string.sub(self.value,3,9))))}) end
  45. end
  46. function speed6:OnSync()
  47.  if tonumber(string.sub(self.value,1,2))==UI.PlayerIndex(index) then
  48.   label:Set({text=string.format("%4.0f",math.sqrt(tonumber(string.sub(self.value,3,9))))}) end
  49. end
  50. function speed7:OnSync()
  51.  if tonumber(string.sub(self.value,1,2))==UI.PlayerIndex(index) then
  52.   label:Set({text=string.format("%4.0f",math.sqrt(tonumber(string.sub(self.value,3,9))))}) end
  53. end
  54. function speed8:OnSync()
  55.  if tonumber(string.sub(self.value,1,2))==UI.PlayerIndex(index) then
  56.   label:Set({text=string.format("%4.0f",math.sqrt(tonumber(string.sub(self.value,3,9))))}) end
  57. end
  58. function speed9:OnSync()
  59.  if tonumber(string.sub(self.value,1,2))==UI.PlayerIndex(index) then
  60.   label:Set({text=string.format("%4.0f",math.sqrt(tonumber(string.sub(self.value,3,9))))}) end
  61. end
  62. function speed10:OnSync()
  63.  if tonumber(string.sub(self.value,1,2))==UI.PlayerIndex(index) then
  64.   label:Set({text=string.format("%4.0f",math.sqrt(tonumber(string.sub(self.value,3,9))))}) end
  65. end
  66. function UI.Event:OnInput(inputs)
  67.  if inputs[UI.KEY.MOUSE1]==true and inputs[UI.KEY.MOUSE2]~=true then a=1 end
  68.  if inputs[UI.KEY.MOUSE2]==true and inputs[UI.KEY.MOUSE1]~=true then a=0 end
  69.  if inputs[UI.KEY.NUM1]==true and inputs[UI.KEY.NUM2]~=true then UI.Signal(2) end
  70.  if inputs[UI.KEY.NUM2]==true and inputs[UI.KEY.NUM1]~=true then UI.Signal(3) end
  71. end
  72.  
  73.  
  74. game.lua
  75. speed1=Game.SyncValue.Create("speed1")
  76. speed2=Game.SyncValue.Create("speed2")
  77. speed3=Game.SyncValue.Create("speed3")
  78. speed4=Game.SyncValue.Create("speed4")
  79. speed5=Game.SyncValue.Create("speed5")
  80. speed6=Game.SyncValue.Create("speed6")
  81. speed7=Game.SyncValue.Create("speed7")
  82. speed8=Game.SyncValue.Create("speed8")
  83. speed9=Game.SyncValue.Create("speed9")
  84. speed10=Game.SyncValue.Create("speed10")
  85. speed={} x={} y={} z={}
  86. function Game.Rule:OnPlayerSignal(player,signal)
  87.  speed[player.index]=player.velocity.x*player.velocity.x+player.velocity.y*player.velocity.y
  88.  if signal==1 and player.velocity.z==0 then player.velocity={z=260} end
  89.  if speed[player.index]~=0 then
  90.   if speed[player.index]<40000 then speed1.value=string.format("%02d%07.0f",player.index,speed[player.index])
  91.    elseif speed[player.index]<160000 then speed2.value=string.format("%02d%07.0f",player.index,speed[player.index])
  92.    elseif speed[player.index]<360000 then speed3.value=string.format("%02d%07.0f",player.index,speed[player.index])
  93.    elseif speed[player.index]<640000 then speed4.value=string.format("%02d%07.0f",player.index,speed[player.index])
  94.    elseif speed[player.index]<1000000 then speed5.value=string.format("%02d%07.0f",player.index,speed[player.index])
  95.    elseif speed[player.index]<1440000 then speed6.value=string.format("%02d%07.0f",player.index,speed[player.index])
  96.    elseif speed[player.index]<1960000 then speed7.value=string.format("%02d%07.0f",player.index,speed[player.index])
  97.    elseif speed[player.index]<2560000 then speed8.value=string.format("%02d%07.0f",player.index,speed[player.index])
  98.    elseif speed[player.index]<3240000 then speed9.value=string.format("%02d%07.0f",player.index,speed[player.index])
  99.    else if speed[player.index]<4000000 then speed10.value=string.format("%02d%07.0f",player.index,speed[player.index])
  100.     else speed10.value=string.format("%02d%07.0f",player.index,4000000) end
  101.    end
  102.  end
  103.  if signal==2 then
  104.   x[player.index]=player.position.x
  105.   y[player.index]=player.position.y
  106.   z[player.index]=player.position.z
  107.  end
  108.  if signal==3 then player.velocity={x=0,y=0,z=0}
  109.   player.position={x=x[player.index],y=y[player.index],z=z[player.index]}
  110.  end
  111. end
  112. function Game.Rule:OnPlayerAttack(victim,attacker,damage,weapontype,hitbox)
  113. return 0 end
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