Thecodeeasar

Ai

Nov 18th, 2024 (edited)
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. -- LocalScript: Place this script inside "StarterPlayerScripts" in Roblox Studio.
  2.  
  3. local player = game.Players.LocalPlayer
  4. local character = player.Character or player.CharacterAdded:Wait()
  5. local humanoid = character:WaitForChild("Humanoid")
  6. local phrases = {
  7. "Hello, world!",
  8. "What's up?",
  9. "I'm just walking around.",
  10. "Jumping is fun!",
  11. "Roblox is awesome!",
  12. "Do you like pizza?",
  13. "Why am I saying this?",
  14. "Randomness is key!"
  15. }
  16.  
  17. -- Function to make the player say random things
  18. local function sayRandomStuff()
  19. while true do
  20. wait(math.random(5, 10)) -- Random delay between 5-10 seconds
  21. local message = phrases[math.random(1, #phrases)]
  22. game.ReplicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(message, "All")
  23. end
  24. end
  25.  
  26. -- Function to make the character perform random actions
  27. local function randomActions()
  28. while true do
  29. wait(math.random(2, 5)) -- Random delay between actions
  30. local action = math.random(1, 3)
  31. if action == 1 then
  32. humanoid:MoveTo(character.Position + Vector3.new(math.random(-10, 10), 0, math.random(-10, 10)))
  33. elseif action == 2 then
  34. humanoid.Jump = true
  35. elseif action == 3 then
  36. humanoid:MoveTo(character.Position + Vector3.new(0, 0, 0)) -- Idle
  37. end
  38. end
  39. end
  40.  
  41. -- Run both functions
  42. spawn(sayRandomStuff)
  43. spawn(randomActions)
  44.  
Advertisement
Add Comment
Please, Sign In to add comment