Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function updateimg(id)
- local args = {
- [1] = "Update",
- [2] = {
- ["ImageId"] = tonumber(id)
- }
- }
- game:GetService("ReplicatedStorage").CustomiseBooth:FireServer(unpack(args))
- end
- function updateDescription(text)
- local args = {
- [1] = "Update",
- [2] = {
- ["DescriptionText"] = tostring(text),
- }
- }
- game:GetService("ReplicatedStorage").CustomiseBooth:FireServer(unpack(args))
- end
- function randomString(length)
- local array = {}
- for i = 1, length do
- array[i] = string.char(math.random(32, 126))
- end
- return table.concat(array)
- end
- local imageIds = {"example1", "example2", "example3"} -- add your IDs here
- local descriptions = {"example1", "example2", "example3"} -- add your descriptions here
- local currentImageIndex = 1
- local currentDescriptionIndex = 1
- local lastImageUpdate = tick()
- local lastDescriptionUpdate = tick()
- while true do
- if tick() - lastImageUpdate >= 2 then -- Change the 2 for decal speed
- updateimg(imageIds[currentImageIndex])
- currentImageIndex = currentImageIndex % #imageIds + 1
- lastImageUpdate = tick()
- end
- if tick() - lastDescriptionUpdate >= 1 then -- Change the 1 for description change speed
- updateDescription(descriptions[currentDescriptionIndex])
- currentDescriptionIndex = currentDescriptionIndex % #descriptions + 1
- lastDescriptionUpdate = tick()
- end
- wait(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement