Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Watercolor By MuLTi --
- local wr, wg, wb = 1, 1, 1
- local curframerate = 1 -- Speed (Default 1, max 2)
- local wrd, wgd, wbd = false, false, false
- local changeVehColors = true -- Change vehicle Colors? set to false, if not. (Default true)
- local enabled = true -- nothing here
- local canEnable = true -- Change, if you can disable watercolor ingame (Default true)
- addEventHandler("onClientRender", getRootElement(), function()
- if(enabled == false) then return end
- if(wr > 0) and (wrd == false)then
- wr = wr+curframerate
- if(wb ~= 1) then
- wb = wb-curframerate
- end
- if(wr > 254) then
- wr = 255
- wrd = true
- end
- elseif(wg > 0) and (wgd == false)then
- wg = wg+curframerate
- wr = wr-curframerate
- if(wg > 254) then
- wg = 255
- wgd = true
- end
- elseif(wb > 0) and (wbd == false)then
- wb = wb+curframerate
- wg = wg-curframerate
- if(wb > 254) then
- wbd = false
- wrd = false
- wgd = false
- wb = 255
- wr = 1
- wg = 1
- end
- end
- setWaterColor(wr, wg, wb, 200)
- if(changeVehColors == true) then
- for index, car in pairs(getElementsByType("vehicle")) do
- setVehicleColor(car, wr, wg, wb, 0, 0, 0, 0, 0, 0)
- end
- end
- end)
- addCommandHandler("waterc", function()
- if(canEnable == false) then return end
- enabled = not enabled
- local prefix = "enabled"
- if(enabled == false) then prefix = "disabled" end
- outputChatBox("Water Color-Rainbow has been "..prefix..".", 0, 255, 0)
- end)
- addCommandHandler("resync",function()
- wr, wg, wb = 1, 1, 1
- outputChatBox("Colors has been resynced.", 0, 200, 0)
- end)
Advertisement
Add Comment
Please, Sign In to add comment