You can display the leaderboard using a Gui or a BillboardGui . For simplicity, we'll just print the leaderboard to the console:
local UserInputService = game:GetService("UserInputService") Roblox Tongue Battles Script
local function retractTongue() if gameEnabled then tonguePart.Size = Vector3.new(tonguePart.Size.X, tonguePart.Size.Y, tonguePart.Size.Z - tongueRetractSpeed) if tonguePart.Size.Z < 0 then tonguePart.Size = Vector3.new(tonguePart.Size.X, tonguePart.Size.Y, 0) end updateLeaderboard() end end You can display the leaderboard using a Gui
We'll use the UserInputService to detect player input. Add the following code: 0 then tonguePart.Size = Vector3.new(tonguePart.Size.X
-- Game settings local gameEnabled = true -- Enable or disable the game local leaderboard = {} -- Table to store player tongue lengths
UserInputService.InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.E then growTongue() elseif input.KeyCode == Enum.KeyCode.R then retractTongue() end end)