Yo, check out my latest creation on Roblox! It’s a game where you play as a tiny potato and try to escape from a giant microwave. The gameplay is super simple - just mash the left and right arrow keys to move and try to avoid getting zapped.
But here’s the twist: every time you die, the microwave gets bigger and the potato gets smaller! Can you survive for more than 60 seconds?
Here’s the code for the potato movement:
local potato = script.Parent
local leftArrowKey = Enum.KeyCode.Left
local rightArrowKey = Enum.KeyCode.Right
local function onKeyPressed(inputObject, gameProcessedEvent)
if gameProcessedEvent then return end
local keyCode = inputObject.KeyCode
if keyCode == leftArrowKey then
potato.Velocity = Vector3.new(-50, 0, 0)
elseif keyCode == rightArrowKey then
potato.Velocity = Vector3.new(50, 0, 0)
end
end
game:GetService("UserInputService").InputBegan:Connect(onKeyPressed)
https://www.roblox.com/games/1234567890/Escape-the-Giant-Microwave