I did it! I got the dhcp profile name, I think it was through dhcp show. Then I deleted the profile using autohotkey (because I couldn't type it fast enough before it disconnected) in putty (the best program to hold a long connection):
AP# configure terminal
AP# no ip dhcp baddhcpprofile
AP# end
AP# commit apply
Finally everything is back to normal. Just a warning to anyone who doesn't have a controller, don't choose L3 dhcp.