more scriptdata stuff

Not that clean but rushed for time