-- Function to enable a GUI that shows the players inventory and health/stamina
function enablePlayerGUI(x, y)
-- Check if x and y are numbers
if type(x) ~= "number" or type(y) ~= "number" then
print("Error: x and y must be numbers") -- Must put in coordinates and you can customize the print command
return
end
-- Calculate the position of the GUI based on x and y
local guiX = math.floor(x * 10)
local guiY = math.floor(y * 10)
-- Show the GUI at the calculated position
showGUI(guiX, guiY)
end
-- Function to show the GUI at the specified position
function showGUI(x, y)
-- Code to show the GUI at the specified position
print("Showing GUI at (" .. x .. ", " .. y .. ")")
end
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter