Is there any way to make my Luxrender compatible with blender 2.5. I have the newest version of luxrender that works with 2.49b but when i try to run the script in 2.5 it says the python is invalid.

Blender 2.4x uses python 2.6.x and blender 2.5 uses python 3.1 as well as api changes to blender. Any python scripts for 2.49 will have to be updated for 2.5. As 2.5 is not yet complete a rewrite may well have to made again in the future once a stable blender 2.5 is released. May not be worth the effort at the moment if it may well have to change again shortly afterwards.

A beta version of the LuxRender export script for Blender 2.5 has been released recently, it is for available for download at the LuxRender forum:

LuxRender comes with the python script for blender included. Extract the zipped file to any directory where you’ll be launching luxrender from there now on. Now all the other files should stay in that folder except the python script, which has a name like You need to put this script into blender’s scripts folder. in windows C:\Program Files\Blender Foundation\Blender.blender\scripts.
That’s all you gotta do. Then when you start blender you can find it on the top menu bar under Render.