Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Init Menu
- Menu.Spacing()
- Menu.Separator()
- Menu.Spacing()
- Menu.Combo( "Show Buttons", "iShowButtons", {"None", "Normal", "Movement" }, 0);
- Menu.SliderFloat("Show Buttons Pos Y", "fShowButtonsY", 0, 10, "%.2f", 1.2)
- -- Init Global
- local Screen = IEngine.GetScreenSize()
- -- Customize
- local x = Globals.ScreenWidth() / 2
- local y = Globals.ScreenHeight() - 150
- local ButonSize = 50
- local Offset = 10
- local TextSize1 = 18
- local TextSize2 = 19
- local col1 = Color.new(100, 100, 100, 255)
- local col2 = Color.new(0, 0, 0, 255)
- local col0 = Color.new(255, 255, 255, 255)
- local col3 = Color.new(0, 0, 0, 255)
- --
- local w = Offset * 2 + ButonSize * 3
- local h = Offset * 2 + ButonSize * 3
- function RenderButton(VK_ID, x1, y1, w, h, Text)
- if InputSys.IsKeyDown(VK_ID) then
- Render.RectFilled(x1, y1, x1 + w, y1 + h, col2, 5)
- else
- Render.RectFilled(x1, y1, x1 + w, y1 + h, col1, 5)
- end
- Render.Text_1(Text, x1 + h / 2, y1 + h / 2 - TextSize1 / 2, TextSize1, col3, true, false)
- end
- function RenderButton2(VK_ID, x1, y1, w, h, Text)
- if InputSys.IsKeyDown(VK_ID) then
- Render.Text_1(Text, x1 + h / 2, y1 + h / 2 - TextSize2 / 2, TextSize2, col0, true, true)
- else
- Render.Text_1("_", x1 + h / 2, y1 + h / 2 - TextSize2 / 2, TextSize2, col0, true, true)
- end
- end
- function PaintTraverse()
- if (not Menu.GetInt("iShowButtons")) then
- return
- end
- if (not Utils.IsLocalAlive()) then
- return
- end
- y = Globals.ScreenHeight() / Menu.GetFloat("fShowButtonsY")
- if (Menu.GetInt("iShowButtons") == 1) then
- RenderButton(0x01, x - w / 2, y - h / 2, ButonSize, ButonSize, "M1")
- RenderButton(0x57, x - w / 2 + ButonSize + Offset, y - h / 2, ButonSize, ButonSize, "W")
- RenderButton(0x02, x - w / 2 + ButonSize * 2 + Offset * 2, y - h / 2, ButonSize, ButonSize, "M2")
- RenderButton(0x41, x - w / 2, y - h / 2 + ButonSize + Offset, ButonSize, ButonSize, "A")
- RenderButton(0x53, x - w / 2 + ButonSize + Offset, y - h / 2 + ButonSize + Offset, ButonSize, ButonSize, "S")
- RenderButton(0x44, x - w / 2 + ButonSize * 2 + Offset * 2, y - h / 2 + ButonSize + Offset, ButonSize, ButonSize, "D")
- RenderButton(0x10, x - w / 2, y - h / 2 + ButonSize * 2 + Offset * 2, ButonSize, ButonSize, "Shift")
- RenderButton(0x20, x - w / 2 + ButonSize + Offset, y - h / 2 + ButonSize * 2 + Offset * 2, ButonSize, ButonSize, "Space")
- RenderButton(0x11, x - w / 2 + ButonSize * 2 + Offset * 2, y - h / 2 + ButonSize * 2 + Offset * 2, ButonSize, ButonSize, "Ctrl")
- elseif (Menu.GetInt("iShowButtons") == 2) then
- RenderButton2(0x41, x - w / 3, y - h / 3, ButonSize, ButonSize, "a")
- RenderButton2(0x57, x - w / 2 + ButonSize + Offset, y - h / 2, ButonSize, ButonSize, "w")
- RenderButton2(0x44, x - w / 3 + ButonSize + Offset, y - h / 3, ButonSize, ButonSize, "d")
- RenderButton2(0x11, x - w / 2 + ButonSize + Offset, y - h / 200, ButonSize, ButonSize, "ctrl")
- RenderButton2(0x53, x - w / 2 + ButonSize + Offset, y - h / 3, ButonSize, ButonSize, "s")
- RenderButton2(0x20, x - w / 2 + ButonSize + Offset, y - h / 7, ButonSize, ButonSize, "space")
- end
- end
- Hack.RegisterCallback("PaintTraverse", PaintTraverse)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement