Advertisement
Guest User

Rate My Avatar Description and Image changing script roblox.

a guest
Jul 17th, 2024
717
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. function updateimg(id)
  2. local args = {
  3. [1] = "Update",
  4. [2] = {
  5. ["ImageId"] = tonumber(id)
  6. }
  7. }
  8. game:GetService("ReplicatedStorage").CustomiseBooth:FireServer(unpack(args))
  9. end
  10.  
  11. function updateDescription(text)
  12. local args = {
  13. [1] = "Update",
  14. [2] = {
  15. ["DescriptionText"] = tostring(text),
  16. }
  17. }
  18. game:GetService("ReplicatedStorage").CustomiseBooth:FireServer(unpack(args))
  19. end
  20.  
  21. function randomString(length)
  22. local array = {}
  23. for i = 1, length do
  24. array[i] = string.char(math.random(32, 126))
  25. end
  26. return table.concat(array)
  27. end
  28.  
  29. local imageIds = {"example1", "example2", "example3"} -- add your IDs here
  30. local descriptions = {"example1", "example2", "example3"} -- add your descriptions here
  31. local currentImageIndex = 1
  32. local currentDescriptionIndex = 1
  33. local lastImageUpdate = tick()
  34. local lastDescriptionUpdate = tick()
  35.  
  36. while true do
  37. if tick() - lastImageUpdate >= 2 then -- Change the 2 for decal speed
  38. updateimg(imageIds[currentImageIndex])
  39. currentImageIndex = currentImageIndex % #imageIds + 1
  40. lastImageUpdate = tick()
  41. end
  42.  
  43. if tick() - lastDescriptionUpdate >= 1 then -- Change the 1 for description change speed
  44. updateDescription(descriptions[currentDescriptionIndex])
  45. currentDescriptionIndex = currentDescriptionIndex % #descriptions + 1
  46. lastDescriptionUpdate = tick()
  47. end
  48.  
  49. wait(0.5)
  50. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement