Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- elseif getElementType(source)=="gui-radiobutton" and getElementParent(source)==candidateList then
- voted=false
- for id,radioButton in ipairs(radioButtons) do
- if guiRadioButtonGetSelected(radioButton)==true then
- voted=radioButton
- break
- end
- end
- if voted==false then return end
- local votedPlayer=guiGetText(voted)
- if string.find(string.lower(votedPlayer),"billionaire")~=nil then
- local toSwapRadioButton=nil
- repeat
- toSwapRadioButton=radioButtons[math.random(#radioButtons)]
- until toSwapRadioButton~=voted
- local swapPlayer=guiGetText(toSwapRadioButton)
- guiSetText(voted,swapPlayer)
- guiSetText(toSwapRadioButton,votedPlayer)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement