Facebook
From ezezez, 5 Months ago, written in Plain Text.
This paste is a reply to Re: Re: Re: skibideez from fhu9g9hg9rhjgiowriguow - view diff
Embed
Download Paste or View Raw
Hits: 166
  1. local gyro = GetPartFromPort(1, "Gyro")
  2.  
  3. -- Gets the player's info
  4. local function getPlayerInfo(playerName)
  5.     -- TODO: replace this with a real function that fetches the player's info from the Roblox leaderboard API
  6. end
  7.  
  8. -- Set up motor pins
  9. local motorPins = {12, 13, 14} -- {1:Left Motor, 2:Right Motor, 3:Vertical Motor}
  10. -- Set up speed for motors
  11. local speed = 50 -- speed value between 0 and 100
  12.  
  13. -- Target player to follow
  14. local targetPlayer = "Player" -- name of the player to follow
  15.  
  16. -- Function to start targeting a player
  17. function target(playerName)
  18.     targetPlayer = playerName
  19.     print("Now following " .. targetPlayer .. " in leaderboard roblox list.")
  20. end
  21.  
  22. -- Function to stop targeting a player
  23. function stopTargeting()
  24.     targetPlayer = nil
  25.     print("Stopped targetting the player in leaderboard roblox list.")
  26. end
  27.  
  28. -- Set up the microphone
  29. local microphone = GetMicrophoneFromPort(2)
  30.  
  31. -- Main loop
  32. while true do
  33.     if targetPlayer then
  34.         local playerInfo = getPlayerInfo(targetPlayer)
  35.         if playerInfo then
  36.             local targetAngle = math.atan2(playerInfo.Y - 50, playerInfo.X - 50) * 180 / math.pi
  37.             gyro.targetRotationY(targetAngle)
  38.         else
  39.             print("Player not found in leaderboard roblox list.")
  40.         end
  41.     end
  42.    
  43.     -- Check if the microphone is activated
  44.     if microphone.isActivated() then
  45.         -- Start targeting the player specified by the microphone
  46.         local detectedPlayerName = "Player" -- replace this with the actual detected player name
  47.         target(detectedPlayerName)
  48.     end
  49.    
  50.     wait(0.05)
  51. end

Replies to Re: Re: Re: Re: skibideez rss

Title Name Language When
Re: Re: Re: Re: Re: skibideez why text 5 Months ago.
Re: Re: Re: Re: Re: skibideez skibidiz ohio limited text 5 Months ago.